[][src]Struct rocket_http::uncased::UncasedStr

#[repr(C)]
pub struct UncasedStr(_);

A reference to an uncased (case-preserving) ASCII string. This is typically created from an &str as follows:

use rocket::http::uncased::UncasedStr;

let ascii_ref: &UncasedStr = "Hello, world!".into();

Methods

impl UncasedStr
[src]

Returns a reference to an UncasedStr from an &str.

Example

use rocket::http::uncased::UncasedStr;

let uncased_str = UncasedStr::new("Hello!");
assert_eq!(uncased_str, "hello!");
assert_eq!(uncased_str, "Hello!");
assert_eq!(uncased_str, "HeLLo!");

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!");

Converts a Box<UncasedStr> into an Uncased without copying or allocating.

Example

use rocket::http::uncased::Uncased;

let uncased = Uncased::new("Hello!");
let boxed = uncased.clone().into_boxed_uncased();
assert_eq!(boxed.into_uncased(), uncased);

Trait Implementations

impl Ord for UncasedStr
[src]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialEq<UncasedStr> for UncasedStr
[src]

This method tests for !=.

impl PartialEq<str> for UncasedStr
[src]

This method tests for !=.

impl PartialEq<UncasedStr> for str
[src]

This method tests for !=.

impl<'a> PartialEq<&'a str> for UncasedStr
[src]

This method tests for !=.

impl<'a> PartialEq<UncasedStr> for &'a str
[src]

This method tests for !=.

impl<'a> From<&'a str> for &'a UncasedStr
[src]

impl Eq for UncasedStr
[src]

impl PartialOrd<UncasedStr> for UncasedStr
[src]

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

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 Display for UncasedStr
[src]

impl Debug for UncasedStr
[src]

impl Hash for UncasedStr
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Borrow<UncasedStr> for Uncased<'a>
[src]

Auto Trait Implementations

impl Send for UncasedStr

impl Sync for UncasedStr

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]