Struct rocket_http::uncased::Uncased [−][src]
pub struct Uncased<'s> { /* fields omitted */ }
Expand description
An uncased (case-preserving), owned or borrowed ASCII string.
Implementations
impl<'s> Uncased<'s>
[src]
impl<'s> Uncased<'s>
[src]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>
[src]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
[src]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>
[src]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
impl<'a> AsRef<UncasedStr> for Uncased<'a>
[src]
impl<'a> AsRef<UncasedStr> for Uncased<'a>
[src]fn as_ref(&self) -> &UncasedStr
[src]
fn as_ref(&self) -> &UncasedStr
[src]Performs the conversion.
impl<'a> Borrow<UncasedStr> for Uncased<'a>
[src]
impl<'a> Borrow<UncasedStr> for Uncased<'a>
[src]fn borrow(&self) -> &UncasedStr
[src]
fn borrow(&self) -> &UncasedStr
[src]Immutably borrows from an owned value. Read more
impl<'a> Deref for Uncased<'a>
[src]
impl<'a> Deref for Uncased<'a>
[src]type Target = UncasedStr
type Target = UncasedStr
The resulting type after dereferencing.
fn deref(&self) -> &UncasedStr
[src]
fn deref(&self) -> &UncasedStr
[src]Dereferences the value.
impl<'a> Ord for Uncased<'a>
[src]
impl<'a> Ord for Uncased<'a>
[src]impl<'a, 'b> PartialOrd<Uncased<'b>> for Uncased<'a>
[src]
impl<'a, 'b> PartialOrd<Uncased<'b>> for Uncased<'a>
[src]fn partial_cmp(&self, other: &Uncased<'b>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Uncased<'b>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]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
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'s> Eq for Uncased<'s>
[src]
Auto Trait Implementations
impl<'s> RefUnwindSafe for Uncased<'s>
impl<'s> Send for Uncased<'s>
impl<'s> Sync for Uncased<'s>
impl<'s> Unpin for Uncased<'s>
impl<'s> UnwindSafe for Uncased<'s>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> IntoCollection<T> for T
[src]
impl<T> IntoCollection<T> for T
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more