Struct rocket::http::uncased::Uncased [−][src]
pub struct Uncased<'s> { /* fields omitted */ }
Expand description
An uncased (case-preserving), owned or borrowed ASCII string.
Implementations
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");
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());
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>
Trait Implementations
Performs the conversion.
Immutably borrows from an owned value. Read more
type Target = UncasedStr
type Target = UncasedStr
The resulting type after dereferencing.
Dereferences the value.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<'s> RefUnwindSafe for Uncased<'s>
impl<'s> UnwindSafe for Uncased<'s>
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.