Trait s2n_quic_core::packet::encoding::PacketPayloadEncoder
source · pub trait PacketPayloadEncoder {
// Required methods
fn encoding_size_hint<E: Encoder>(
&mut self,
encoder: &E,
minimum_len: usize
) -> usize;
fn encode(
&mut self,
buffer: &mut Buffer<'_>,
minimum_len: usize,
header_len: usize,
tag_len: usize
);
}
Required Methods§
sourcefn encoding_size_hint<E: Encoder>(
&mut self,
encoder: &E,
minimum_len: usize
) -> usize
fn encoding_size_hint<E: Encoder>( &mut self, encoder: &E, minimum_len: usize ) -> usize
Returns an estimate of the encoding size of the payload. This may be inaccurate from what actually is encoded. Estimates should be less than or equal to what is actually written. Implementations can return 0 to skip encoding.
Object Safety§
This trait is not object safe.