[][src]Struct hpack_codec::field::HeaderField

pub struct HeaderField<'a> { /* fields omitted */ }

Header Field.

This is a name-value pair. Both the name and value are treated as opaque sequences of octets.

Methods

impl<'a> HeaderField<'a>[src]

pub fn new(name: &'a [u8], value: &'a [u8]) -> Result<Self>[src]

Makes a new HeaderField instance.

Errors

If the size of resulting header is too large, the function will returns an Error.

The maximum size of a header (i.e., the sum of it's name and value) is std::u16::MAX - 32.

pub fn name(&self) -> &[u8][src]

Returns the name of this header field.

pub fn value(&self) -> &[u8][src]

Returns the value of this header field.

pub fn entry_size(&self) -> u16[src]

Returns the entry size of this header field.

See: 4.1. Calculating Table Size

Trait Implementations

impl From<StaticEntry> for HeaderField<'static>[src]

impl<'a> Clone for HeaderField<'a>[src]

impl<'a> Eq for HeaderField<'a>[src]

impl<'a> PartialEq<HeaderField<'a>> for HeaderField<'a>[src]

impl<'a> Debug for HeaderField<'a>[src]

impl<'a> StructuralPartialEq for HeaderField<'a>[src]

impl<'a> StructuralEq for HeaderField<'a>[src]

Auto Trait Implementations

impl<'a> Send for HeaderField<'a>

impl<'a> Sync for HeaderField<'a>

impl<'a> Unpin for HeaderField<'a>

impl<'a> UnwindSafe for HeaderField<'a>

impl<'a> RefUnwindSafe for HeaderField<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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