pub enum Header<T = HeaderName> {
Field {
name: T,
value: HeaderValue,
},
Authority(ByteString),
Method(Method),
Scheme(ByteString),
Path(ByteString),
Protocol(ByteString),
Status(StatusCode),
}Expand description
HTTP/2 Header
Variants
Field
Authority(ByteString)
Method(Method)
Scheme(ByteString)
Path(ByteString)
Protocol(ByteString)
Status(StatusCode)
Implementations
sourceimpl Header<Option<HeaderName>>
impl Header<Option<HeaderName>>
pub fn reify(self) -> Result<Header, HeaderValue>
sourceimpl Header
impl Header
pub fn new(name: Bytes, value: Bytes) -> Result<Header, DecoderError>
pub fn len(&self) -> usize
pub fn value_slice(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn value_eq(&self, other: &Header) -> bool
pub fn is_sensitive(&self) -> bool
pub fn skip_value_index(&self) -> bool
Trait Implementations
sourceimpl From<Header<HeaderName>> for Header<Option<HeaderName>>
impl From<Header<HeaderName>> for Header<Option<HeaderName>>
impl<T: Eq> Eq for Header<T>
impl<T> StructuralEq for Header<T>
impl<T> StructuralPartialEq for Header<T>
Auto Trait Implementations
impl<T = HeaderName> !RefUnwindSafe for Header<T>
impl<T> Send for Header<T> where
T: Send,
impl<T> Sync for Header<T> where
T: Sync,
impl<T> Unpin for Header<T> where
T: Unpin,
impl<T = HeaderName> !UnwindSafe for Header<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more