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§

source

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

Encodes the value into the encoder

Provided Methods§

source

fn encode_mut<E>(&mut self, encoder: &mut E)
where E: Encoder,

Encodes the value into the encoder, while potentially mutating the value itself

source

fn encoding_size(&self) -> usize

Returns the encoding size with no buffer constrains

source

fn encoding_size_for_encoder<E>(&self, encoder: &E) -> usize
where E: Encoder,

Returns the encoding size for the given encoder’s capacity

source

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,

Encodes the value into the encoder with a prefix of Len

source

fn encode_to_vec(&self) -> Vec<u8>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl EncoderValue for &[&[u8]]

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for &[u8]

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for &mut [u8]

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for f32

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for f64

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for i8

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for i16

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for i32

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for i64

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for i128

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for u8

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for u16

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for u32

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for u64

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for u128

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl EncoderValue for ()

source§

fn encode<E>(&self, _encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, _encoder: &E) -> usize
where E: Encoder,

source§

impl<A, B> EncoderValue for (A, B)

source§

fn encode<E>(&self, encoder: &mut E)
where E: Encoder,

source§

fn encoding_size(&self) -> usize

source§

fn encoding_size_for_encoder<E>(&self, encoder: &E) -> usize
where E: Encoder,

source§

impl<T> EncoderValue for Option<T>
where T: EncoderValue,

source§

fn encode<E>(&self, buffer: &mut E)
where E: Encoder,

source§

fn encode_mut<E>(&mut self, buffer: &mut E)
where E: Encoder,

Implementors§

source§

impl EncoderValue for InitialId

source§

impl EncoderValue for LocalId

source§

impl EncoderValue for PeerId

source§

impl EncoderValue for UnboundedId

source§

impl EncoderValue for HandshakeHeader

source§

impl EncoderValue for EcnCounts

source§

impl EncoderValue for DataBlocked

source§

impl EncoderValue for HandshakeDone

source§

impl EncoderValue for MaxData

source§

impl EncoderValue for MaxStreamData

source§

impl EncoderValue for MaxStreams

source§

impl EncoderValue for Padding

source§

impl EncoderValue for Ping

source§

impl EncoderValue for ResetStream

source§

impl EncoderValue for RetireConnectionId

source§

impl EncoderValue for StopSending

source§

impl EncoderValue for StreamDataBlocked

source§

impl EncoderValue for StreamsBlocked

source§

impl EncoderValue for EtherType

source§

impl EncoderValue for s2n_quic_core::inet::ethernet::Header
where Header: AsBytes,

source§

impl EncoderValue for MacAddress

source§

impl EncoderValue for Protocol

source§

impl EncoderValue for FlagFragment

source§

impl EncoderValue for s2n_quic_core::inet::ipv4::Header
where Header: AsBytes,

source§

impl EncoderValue for IpV4Address

source§

impl EncoderValue for SocketAddressV4

source§

impl EncoderValue for Tos
where Tos: AsBytes,

source§

impl EncoderValue for Vihl
where Vihl: AsBytes,

source§

impl EncoderValue for s2n_quic_core::inet::ipv6::Header
where Header: AsBytes,

source§

impl EncoderValue for IpV6Address

source§

impl EncoderValue for SocketAddressV6

source§

impl EncoderValue for Vtcfl
where Vtcfl: AsBytes,

source§

impl EncoderValue for s2n_quic_core::inet::udp::Header
where Header: AsBytes,

source§

impl EncoderValue for DecoderBufferMut<'_>

source§

impl EncoderValue for TruncatedPacketNumber

source§

impl EncoderValue for Token

source§

impl EncoderValue for InitialSourceConnectionId

source§

impl EncoderValue for OriginalDestinationConnectionId

source§

impl EncoderValue for PreferredAddress

source§

impl EncoderValue for RetrySourceConnectionId

source§

impl EncoderValue for VarInt

source§

impl EncoderValue for DecoderBuffer<'_>

source§

impl EncoderValue for i24

source§

impl EncoderValue for i48

source§

impl EncoderValue for u24

source§

impl EncoderValue for u48

source§

impl EncoderValue for I16
where I16: AsBytes,

source§

impl EncoderValue for I32
where I32: AsBytes,

source§

impl EncoderValue for I64
where I64: AsBytes,

source§

impl EncoderValue for I128
where I128: AsBytes,

source§

impl EncoderValue for U16
where U16: AsBytes,

source§

impl EncoderValue for U32
where U32: AsBytes,

source§

impl EncoderValue for U64
where U64: AsBytes,

source§

impl EncoderValue for U128
where U128: AsBytes,

source§

impl<'a> EncoderValue for &'a HandshakeHeader

source§

impl<'a> EncoderValue for &'a EtherType

source§

impl<'a> EncoderValue for &'a s2n_quic_core::inet::ethernet::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a MacAddress

source§

impl<'a> EncoderValue for &'a Protocol

source§

impl<'a> EncoderValue for &'a FlagFragment

source§

impl<'a> EncoderValue for &'a s2n_quic_core::inet::ipv4::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a IpV4Address

source§

impl<'a> EncoderValue for &'a SocketAddressV4

source§

impl<'a> EncoderValue for &'a Tos
where Tos: AsBytes,

source§

impl<'a> EncoderValue for &'a Vihl
where Vihl: AsBytes,

source§

impl<'a> EncoderValue for &'a s2n_quic_core::inet::ipv6::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a IpV6Address

source§

impl<'a> EncoderValue for &'a SocketAddressV6

source§

impl<'a> EncoderValue for &'a Vtcfl
where Vtcfl: AsBytes,

source§

impl<'a> EncoderValue for &'a s2n_quic_core::inet::udp::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a I16
where I16: AsBytes,

source§

impl<'a> EncoderValue for &'a I32
where I32: AsBytes,

source§

impl<'a> EncoderValue for &'a I64
where I64: AsBytes,

source§

impl<'a> EncoderValue for &'a I128
where I128: AsBytes,

source§

impl<'a> EncoderValue for &'a U16
where U16: AsBytes,

source§

impl<'a> EncoderValue for &'a U32
where U32: AsBytes,

source§

impl<'a> EncoderValue for &'a U64
where U64: AsBytes,

source§

impl<'a> EncoderValue for &'a U128
where U128: AsBytes,

source§

impl<'a> EncoderValue for &'a mut HandshakeHeader

source§

impl<'a> EncoderValue for &'a mut EtherType

source§

impl<'a> EncoderValue for &'a mut s2n_quic_core::inet::ethernet::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a mut MacAddress

source§

impl<'a> EncoderValue for &'a mut Protocol

source§

impl<'a> EncoderValue for &'a mut FlagFragment

source§

impl<'a> EncoderValue for &'a mut s2n_quic_core::inet::ipv4::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a mut IpV4Address

source§

impl<'a> EncoderValue for &'a mut SocketAddressV4

source§

impl<'a> EncoderValue for &'a mut Tos
where Tos: AsBytes,

source§

impl<'a> EncoderValue for &'a mut Vihl
where Vihl: AsBytes,

source§

impl<'a> EncoderValue for &'a mut s2n_quic_core::inet::ipv6::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a mut IpV6Address

source§

impl<'a> EncoderValue for &'a mut SocketAddressV6

source§

impl<'a> EncoderValue for &'a mut Vtcfl
where Vtcfl: AsBytes,

source§

impl<'a> EncoderValue for &'a mut s2n_quic_core::inet::udp::Header
where Header: AsBytes,

source§

impl<'a> EncoderValue for &'a mut I16
where I16: AsBytes,

source§

impl<'a> EncoderValue for &'a mut I32
where I32: AsBytes,

source§

impl<'a> EncoderValue for &'a mut I64
where I64: AsBytes,

source§

impl<'a> EncoderValue for &'a mut I128
where I128: AsBytes,

source§

impl<'a> EncoderValue for &'a mut U16
where U16: AsBytes,

source§

impl<'a> EncoderValue for &'a mut U32
where U32: AsBytes,

source§

impl<'a> EncoderValue for &'a mut U64
where U64: AsBytes,

source§

impl<'a> EncoderValue for &'a mut U128
where U128: AsBytes,

source§

impl<'a> EncoderValue for ConnectionClose<'a>

source§

impl<'a> EncoderValue for NewConnectionId<'a>

source§

impl<'a> EncoderValue for NewToken<'a>

source§

impl<'a> EncoderValue for PathChallenge<'a>

source§

impl<'a> EncoderValue for PathResponse<'a>

source§

impl<'a> EncoderValue for PseudoRetry<'a>

source§

impl<'a> EncoderValue for Retry<'a>

source§

impl<'a, AckRanges: AckRanges, Data: EncoderValue> EncoderValue for Frame<'a, AckRanges, Data>

source§

impl<'a, SupportedVersions: EncoderValue> EncoderValue for VersionNegotiation<'a, SupportedVersions>

source§

impl<A: AckRanges> EncoderValue for Ack<A>

source§

impl<DCID: EncoderValue, Payload: EncoderValue> EncoderValue for Short<DCID, KeyPhase, TruncatedPacketNumber, Payload>

source§

impl<DCID: EncoderValue, SCID: EncoderValue, Payload: EncoderValue> EncoderValue for Handshake<DCID, SCID, TruncatedPacketNumber, Payload>

source§

impl<DCID: EncoderValue, SCID: EncoderValue, Payload: EncoderValue> EncoderValue for ZeroRtt<DCID, SCID, TruncatedPacketNumber, Payload>

source§

impl<DCID: EncoderValue, SCID: EncoderValue, Token: EncoderValue, Payload: EncoderValue> EncoderValue for Initial<DCID, SCID, Token, TruncatedPacketNumber, Payload>

source§

impl<Data: EncoderValue> EncoderValue for Crypto<Data>

source§

impl<Data: EncoderValue> EncoderValue for Datagram<Data>

source§

impl<Data: EncoderValue> EncoderValue for Stream<Data>

source§

impl<OriginalDestinationConnectionId, StatelessResetToken, PreferredAddress, RetrySourceConnectionId> EncoderValue for TransportParameters<OriginalDestinationConnectionId, StatelessResetToken, PreferredAddress, RetrySourceConnectionId>
where OriginalDestinationConnectionId: TransportParameter, OriginalDestinationConnectionId::CodecValue: EncoderValue, StatelessResetToken: TransportParameter, StatelessResetToken::CodecValue: EncoderValue, PreferredAddress: TransportParameter, PreferredAddress::CodecValue: EncoderValue, RetrySourceConnectionId: TransportParameter, RetrySourceConnectionId::CodecValue: EncoderValue,