rocket::http::uncased

Trait AsUncased

Source
pub trait AsUncased {
    // Required method
    fn as_uncased(&self) -> &UncasedStr;
}
Expand description

Helper trait to convert string-like references to &UncasedStr.

§Example

use uncased::AsUncased;

let string = "Hello, world!".as_uncased();
assert_eq!(string, "hello, world!");
assert_eq!(string, "HELLO, world!");
assert_eq!(string, "HELLO, WORLD!");

Required Methods§

Source

fn as_uncased(&self) -> &UncasedStr

Convert self to an UncasedStr.

Implementors§

Source§

impl<T> AsUncased for T
where T: AsRef<str> + ?Sized,