Struct hpack_codec::field::HeaderField
[−]
[src]
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]
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
.
fn name(&self) -> &[u8]
[src]
Returns the name of this header field.
fn value(&self) -> &[u8]
[src]
Returns the value of this header field.
fn entry_size(&self) -> u16
[src]
Returns the entry size of this header field.
Trait Implementations
impl<'a> Debug for HeaderField<'a>
[src]
impl<'a> Clone for HeaderField<'a>
[src]
fn clone(&self) -> HeaderField<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> PartialEq for HeaderField<'a>
[src]
fn eq(&self, __arg_0: &HeaderField<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HeaderField<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Eq for HeaderField<'a>
[src]
impl From<StaticEntry> for HeaderField<'static>
[src]
fn from(f: StaticEntry) -> Self
[src]
Performs the conversion.