Trait s2n_quic_core::packet::encoding::PacketPayloadEncoder
source · [−]pub trait PacketPayloadEncoder {
fn encoding_size_hint<E: Encoder>(
&mut self,
encoder: &E,
minimum_len: usize
) -> usize;
fn encode(
&mut self,
buffer: &mut EncoderBuffer<'_>,
minimum_len: usize,
header_len: usize,
tag_len: usize
);
}Required Methods
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.