[−][src]Struct rocket::http::uncased::Uncased
An uncased (case-preserving), owned or borrowed ASCII string.
Methods
impl<'s> Uncased<'s>
[src]
pub fn new<S>(string: S) -> Uncased<'s> where
S: Into<Cow<'s, str>>,
[src]
S: Into<Cow<'s, str>>,
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]
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]
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]
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> AsRef<UncasedStr> for Uncased<'a>
[src]
fn as_ref(&self) -> &UncasedStr
[src]
impl<'a> Borrow<UncasedStr> for Uncased<'a>
[src]
fn borrow(&self) -> &UncasedStr
[src]
impl<'s> Clone for Uncased<'s>
[src]
impl<'s> Debug for Uncased<'s>
[src]
impl<'a> Deref for Uncased<'a>
[src]
impl<'s> Display for Uncased<'s>
[src]
impl<'s> Eq for Uncased<'s>
[src]
impl<'s, 'c> From<&'c str> for Uncased<'s> where
'c: 's,
[src]
'c: 's,
impl<'s, 'c> From<Cow<'c, str>> for Uncased<'s> where
'c: 's,
[src]
'c: 's,
impl From<String> for Uncased<'static>
[src]
impl<'s, 'c, T> From<T> for Uncased<'s> where
'c: 's,
T: Into<Cow<'c, str>>,
[src]
'c: 's,
T: Into<Cow<'c, str>>,
impl<'s> Hash for Uncased<'s>
[src]
fn hash<H>(&self, hasher: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Ord for Uncased<'a>
[src]
fn cmp(&self, other: &Uncased<'a>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a, 'b> PartialEq<&'b str> for Uncased<'a>
[src]
impl<'a, 'b> PartialEq<Uncased<'b>> for &'a str
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'b> PartialEq<Uncased<'b>> for str
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b> PartialEq<Uncased<'b>> for Uncased<'a>
[src]
fn eq(&self, other: &Uncased<'b>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> PartialEq<str> for Uncased<'a>
[src]
impl<'a, 'b> PartialOrd<Uncased<'b>> for Uncased<'a>
[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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
[src]
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
[src]
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
[src]
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
[src]
T: Any,