[−][src]Struct hpack_codec::field::HeaderField
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.
Trait Implementations
impl From<StaticEntry> for HeaderField<'static>
[src]
fn from(f: StaticEntry) -> Self
[src]
impl<'a> Clone for HeaderField<'a>
[src]
fn clone(&self) -> HeaderField<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Eq for HeaderField<'a>
[src]
impl<'a> PartialEq<HeaderField<'a>> for HeaderField<'a>
[src]
fn eq(&self, other: &HeaderField<'a>) -> bool
[src]
fn ne(&self, other: &HeaderField<'a>) -> bool
[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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,