Trait s2n_quic_core::havoc::EncoderValue
source · pub trait EncoderValue: Sized {
// Required method
fn encode<E>(&self, encoder: &mut E)
where E: Encoder;
// Provided methods
fn encode_mut<E>(&mut self, encoder: &mut E)
where E: Encoder { ... }
fn encoding_size(&self) -> usize { ... }
fn encoding_size_for_encoder<E>(&self, encoder: &E) -> usize
where E: Encoder { ... }
fn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
where Len: TryFrom<usize> + EncoderValue,
E: Encoder,
Self: Sized,
<Len as TryFrom<usize>>::Error: Debug { ... }
fn encode_to_vec(&self) -> Vec<u8> { ... }
}
Required Methods§
Provided Methods§
sourcefn encode_mut<E>(&mut self, encoder: &mut E)where
E: Encoder,
fn encode_mut<E>(&mut self, encoder: &mut E)where
E: Encoder,
Encodes the value into the encoder, while potentially mutating the value itself
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E>(&self, encoder: &E) -> usizewhere
E: Encoder,
fn encoding_size_for_encoder<E>(&self, encoder: &E) -> usizewhere
E: Encoder,
Returns the encoding size for the given encoder’s capacity
sourcefn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
fn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
Encodes the value into the encoder with a prefix of Len
fn encode_to_vec(&self) -> Vec<u8>
Object Safety§
This trait is not object safe.