pub struct PreferredAddress {
pub ipv4_address: Option<SocketAddressV4>,
pub ipv6_address: Option<SocketAddressV6>,
pub connection_id: UnboundedId,
pub stateless_reset_token: Token,
}Fields§
§ipv4_address: Option<SocketAddressV4>§ipv6_address: Option<SocketAddressV6>§connection_id: UnboundedId§stateless_reset_token: TokenTrait Implementations§
Source§impl Clone for PreferredAddress
impl Clone for PreferredAddress
Source§fn clone(&self) -> PreferredAddress
fn clone(&self) -> PreferredAddress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreferredAddress
impl Debug for PreferredAddress
Source§impl<'a> DecoderValue<'a> for PreferredAddress
impl<'a> DecoderValue<'a> for PreferredAddress
fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'a, Self>
Source§impl<'a> DecoderValueMut<'a> for PreferredAddress
impl<'a> DecoderValueMut<'a> for PreferredAddress
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'a, Self>
Source§impl EncoderValue for PreferredAddress
impl EncoderValue for PreferredAddress
Source§fn 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
Source§fn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
Source§fn 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
Source§fn 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
Lenfn encode_to_vec(&self) -> Vec<u8> ⓘ
Source§impl<'a> IntoEvent<PreferredAddress<'a>> for &'a PreferredAddress
impl<'a> IntoEvent<PreferredAddress<'a>> for &'a PreferredAddress
fn into_event(self) -> PreferredAddress<'a>
Source§impl PartialEq for PreferredAddress
impl PartialEq for PreferredAddress
Source§impl TransportParameter for PreferredAddress
impl TransportParameter for PreferredAddress
Source§type CodecValue = PreferredAddress
type CodecValue = PreferredAddress
Associated type for decoding/encoding the TransportParameter
Source§fn from_codec_value(value: Self) -> Self
fn from_codec_value(value: Self) -> Self
Create a
TransportParameter from the CodecValueSource§fn try_into_codec_value(&self) -> Option<&Self>
fn try_into_codec_value(&self) -> Option<&Self>
Attempts to convert the
TransportParameter into the CodecValueSource§fn default_value() -> Self
fn default_value() -> Self
Returns the default value for the TransportParameter
This is used instead of
Default::default so it is
easily overridableSource§fn append_to_buffer(&self, buffer: &mut Vec<u8>)
fn append_to_buffer(&self, buffer: &mut Vec<u8>)
Appends this
TransportParameter to the given buffer containing
already encoded TransportParametersSource§impl TransportParameterValidator for PreferredAddress
impl TransportParameterValidator for PreferredAddress
Source§fn validate(self) -> Result<Self, DecoderError>
fn validate(self) -> Result<Self, DecoderError>
Validates that the transport parameter is in a valid state
Source§impl Unspecified for PreferredAddress
impl Unspecified for PreferredAddress
Source§fn is_unspecified(&self) -> bool
fn is_unspecified(&self) -> bool
Returns true if the value is unspecified
Source§fn filter_unspecified(self) -> Option<Self>
fn filter_unspecified(self) -> Option<Self>
Coerce a potentially unspecified value into an
Option<Self>impl Copy for PreferredAddress
impl StructuralPartialEq for PreferredAddress
Auto Trait Implementations§
impl Freeze for PreferredAddress
impl RefUnwindSafe for PreferredAddress
impl Send for PreferredAddress
impl Sync for PreferredAddress
impl Unpin for PreferredAddress
impl UnwindSafe for PreferredAddress
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,
Source§impl<T> PacketPayloadEncoder for Twhere
T: EncoderValue,
impl<T> PacketPayloadEncoder for Twhere
T: EncoderValue,
Source§fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usizewhere
E: Encoder,
fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usizewhere
E: Encoder,
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.