pub enum HeaderKey<'a> {
StrRef(&'a str),
Str(String),
}
Expand description
Allows the HeaderKey to take the form of a variety of different valid Types, mostly related to their lifetimes. This however also gives more control over how they are compared to each other, ignoring case in this case
use stream_httparse::header::HeaderKey;
assert_eq!(HeaderKey::StrRef("TeSt"), HeaderKey::StrRef("test"));
Variants§
StrRef(&'a str)
Stores the Key as a refernce to a String
Str(String)
Stores the Key as an owned String
Implementations§
Trait Implementations§
Source§impl Ord for HeaderKey<'_>
impl Ord for HeaderKey<'_>
Source§impl PartialOrd for HeaderKey<'_>
impl PartialOrd for HeaderKey<'_>
impl Eq for HeaderKey<'_>
Auto Trait Implementations§
impl<'a> Freeze for HeaderKey<'a>
impl<'a> RefUnwindSafe for HeaderKey<'a>
impl<'a> Send for HeaderKey<'a>
impl<'a> Sync for HeaderKey<'a>
impl<'a> Unpin for HeaderKey<'a>
impl<'a> UnwindSafe for HeaderKey<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more