[−][src]Struct rocket_http::uncased::Uncased
An uncased (case-preserving), owned or borrowed ASCII string.
Methods
impl<'s> Uncased<'s>
[src]
impl<'s> Uncased<'s>
pub fn new<S: Into<Cow<'s, str>>>(string: S) -> Uncased<'s>
[src]
pub fn new<S: Into<Cow<'s, str>>>(string: S) -> Uncased<'s>
Creates a new Uncased
string from string
without allocating.
Example
use rocket::http::uncased::Uncased; let uncased = Uncased::new("Content-Type"); assert_eq!(uncased, "content-type"); assert_eq!(uncased, "CONTENT-Type");
pub fn into_string(self) -> String
[src]
pub fn into_string(self) -> String
Converts self
into an owned String
, allocating if necessary.
Example
use rocket::http::uncased::Uncased; let uncased = Uncased::new("Content-Type"); let string = uncased.into_string(); assert_eq!(string, "Content-Type".to_string());
pub fn into_boxed_uncased(self) -> Box<UncasedStr>
[src]
pub fn into_boxed_uncased(self) -> Box<UncasedStr>
Converts self
into a Box<UncasedStr>
.
Example
use rocket::http::uncased::Uncased; let boxed = Uncased::new("Content-Type").into_boxed_uncased(); assert_eq!(&*boxed, "content-type");
Methods from Deref<Target = UncasedStr>
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
Returns self
as an &str
.
Example
use rocket::http::uncased::UncasedStr; let uncased_str = UncasedStr::new("Hello!"); assert_eq!(uncased_str.as_str(), "Hello!"); assert_ne!(uncased_str.as_str(), "hELLo!");
Trait Implementations
impl<'a> Ord for Uncased<'a>
[src]
impl<'a> Ord for Uncased<'a>
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<'a, 'b> PartialEq<Uncased<'b>> for Uncased<'a>
[src]
impl<'a, 'b> PartialEq<Uncased<'b>> for Uncased<'a>
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a> PartialEq<str> for Uncased<'a>
[src]
impl<'a> PartialEq<str> for Uncased<'a>
fn eq(&self, other: &str) -> bool
[src]
fn eq(&self, other: &str) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'b> PartialEq<Uncased<'b>> for str
[src]
impl<'b> PartialEq<Uncased<'b>> for str
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b str> for Uncased<'a>
[src]
impl<'a, 'b> PartialEq<&'b str> for Uncased<'a>
fn eq(&self, other: &&'b str) -> bool
[src]
fn eq(&self, other: &&'b str) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<Uncased<'b>> for &'a str
[src]
impl<'a, 'b> PartialEq<Uncased<'b>> for &'a str
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'s, 'c: 's> From<&'c str> for Uncased<'s>
[src]
impl<'s, 'c: 's> From<&'c str> for Uncased<'s>
impl From<String> for Uncased<'static>
[src]
impl From<String> for Uncased<'static>
impl<'s, 'c: 's> From<Cow<'c, str>> for Uncased<'s>
[src]
impl<'s, 'c: 's> From<Cow<'c, str>> for Uncased<'s>
impl<'s, 'c: 's, T: Into<Cow<'c, str>>> From<T> for Uncased<'s>
[src]
impl<'s, 'c: 's, T: Into<Cow<'c, str>>> From<T> for Uncased<'s>
impl<'s> Clone for Uncased<'s>
[src]
impl<'s> Clone for Uncased<'s>
fn clone(&self) -> Uncased<'s>
[src]
fn clone(&self) -> Uncased<'s>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'s> Eq for Uncased<'s>
[src]
impl<'s> Eq for Uncased<'s>
impl<'a, 'b> PartialOrd<Uncased<'b>> for Uncased<'a>
[src]
impl<'a, 'b> PartialOrd<Uncased<'b>> for Uncased<'a>
fn partial_cmp(&self, other: &Uncased<'b>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Uncased<'b>) -> Option<Ordering>
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> AsRef<UncasedStr> for Uncased<'a>
[src]
impl<'a> AsRef<UncasedStr> for Uncased<'a>
fn as_ref(&self) -> &UncasedStr
[src]
fn as_ref(&self) -> &UncasedStr
impl<'s> Display for Uncased<'s>
[src]
impl<'s> Display for Uncased<'s>
impl<'s> Debug for Uncased<'s>
[src]
impl<'s> Debug for Uncased<'s>
impl<'a> Deref for Uncased<'a>
[src]
impl<'a> Deref for Uncased<'a>
type Target = UncasedStr
The resulting type after dereferencing.
fn deref(&self) -> &UncasedStr
[src]
fn deref(&self) -> &UncasedStr
impl<'s> Hash for Uncased<'s>
[src]
impl<'s> Hash for Uncased<'s>
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Borrow<UncasedStr> for Uncased<'a>
[src]
impl<'a> Borrow<UncasedStr> for Uncased<'a>
fn borrow(&self) -> &UncasedStr
[src]
fn borrow(&self) -> &UncasedStr
Auto Trait Implementations
Blanket Implementations
impl<T> IntoCollection for T
[src]
impl<T> IntoCollection for T
ⓘImportant traits for SmallVec<A>fn into_collection<A>(Self) -> SmallVec<A> where
A: Array<Item = T>,
[src]
fn into_collection<A>(Self) -> SmallVec<A> where
A: Array<Item = T>,
ⓘImportant traits for SmallVec<A>fn mapped<U, F, A>(Self, F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
[src]
fn mapped<U, F, A>(Self, F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, I> AsResult for T where
I: Input,
[src]
impl<T, I> AsResult for T where
I: Input,
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
fn equivalent(&self, key: &K) -> bool
impl<T> Typeable for T where
T: Any,
[src]
impl<T> Typeable for T where
T: Any,