Struct ExtensionHeaders
pub struct ExtensionHeaders {
pub key_value_pairs: Vec<KeyValuePair>,
}Fields§
§key_value_pairs: Vec<KeyValuePair>Implementations§
§impl ExtensionHeaders
impl ExtensionHeaders
pub fn new(key_value_pairs: Vec<KeyValuePair>) -> ExtensionHeaders
pub fn from_immutable_extensions(values: Vec<Bytes>) -> ExtensionHeaders
pub fn decode(cursor: &mut impl Buf) -> Result<ExtensionHeaders, DecodeError>
pub fn decode(cursor: &mut impl Buf) -> Result<ExtensionHeaders, DecodeError>
Fails with NeedMoreData until the length and the whole block have
arrived, and with Fatal when the length exceeds 16 MiB
(MAX_WIRE_DECLARED_LENGTH) or a Key-Value-Pair ends after the block.
pub fn encode(&self) -> Result<BytesMut, Error>
pub fn encode(&self) -> Result<BytesMut, Error>
The draft-14 Extension Headers Length and Key-Value-Pairs. Fails with
UnencodableObject::ExtensionHeaders when a key or value exceeds a
draft-14 varint.
pub fn prior_group_id_gap(&self) -> Vec<u64>
pub fn immutable_extensions(&self) -> Vec<Bytes>
pub fn push_prior_group_id_gap(&mut self, gap: u64)
pub fn push_immutable_extension(&mut self, value: Bytes)
Trait Implementations§
§impl Clone for ExtensionHeaders
impl Clone for ExtensionHeaders
§fn clone(&self) -> ExtensionHeaders
fn clone(&self) -> ExtensionHeaders
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ExtensionHeaders
impl Debug for ExtensionHeaders
§impl Default for ExtensionHeaders
impl Default for ExtensionHeaders
§fn default() -> ExtensionHeaders
fn default() -> ExtensionHeaders
Returns the “default value” for a type. Read more
impl Eq for ExtensionHeaders
§impl PartialEq for ExtensionHeaders
impl PartialEq for ExtensionHeaders
impl StructuralPartialEq for ExtensionHeaders
Auto Trait Implementations§
impl Freeze for ExtensionHeaders
impl RefUnwindSafe for ExtensionHeaders
impl Send for ExtensionHeaders
impl Sync for ExtensionHeaders
impl Unpin for ExtensionHeaders
impl UnsafeUnpin for ExtensionHeaders
impl UnwindSafe for ExtensionHeaders
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.