Struct s2n_quic_transport::connection::id::UnboundedId
source · pub struct UnboundedId { /* private fields */ }
Expand description
Uniquely identifies a QUIC connection between 2 peers
Implementations§
source§impl UnboundedId
impl UnboundedId
sourcepub fn try_from_bytes(bytes: &[u8]) -> Option<UnboundedId>
pub fn try_from_bytes(bytes: &[u8]) -> Option<UnboundedId>
Creates a connection ID from a byte array.
If the passed byte array exceeds the maximum allowed length for
Connection IDs (20 bytes in QUIC v1) None
will be returned.
All other input values are valid.
Trait Implementations§
source§impl AsRef<[u8]> for UnboundedId
impl AsRef<[u8]> for UnboundedId
source§impl Clone for UnboundedId
impl Clone for UnboundedId
source§fn clone(&self) -> UnboundedId
fn clone(&self) -> UnboundedId
Returns a copy 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 UnboundedId
impl Debug for UnboundedId
source§impl<'a> DecoderValue<'a> for UnboundedId
impl<'a> DecoderValue<'a> for UnboundedId
fn decode( buffer: DecoderBuffer<'a>, ) -> Result<(UnboundedId, DecoderBuffer<'a>), DecoderError>
source§impl<'a> DecoderValueMut<'a> for UnboundedId
impl<'a> DecoderValueMut<'a> for UnboundedId
fn decode_mut( buffer: DecoderBufferMut<'a>, ) -> Result<(UnboundedId, DecoderBufferMut<'a>), DecoderError>
source§impl Default for UnboundedId
impl Default for UnboundedId
source§fn default() -> UnboundedId
fn default() -> UnboundedId
Returns the “default value” for a type. Read more
source§impl EncoderValue for UnboundedId
impl EncoderValue for UnboundedId
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
Len
fn encode_to_vec(&self) -> Vec<u8>
source§impl From<InitialId> for UnboundedId
impl From<InitialId> for UnboundedId
source§fn from(id: InitialId) -> UnboundedId
fn from(id: InitialId) -> UnboundedId
Converts to this type from the input type.
source§impl From<LocalId> for UnboundedId
impl From<LocalId> for UnboundedId
source§fn from(id: LocalId) -> UnboundedId
fn from(id: LocalId) -> UnboundedId
Converts to this type from the input type.
source§impl From<PeerId> for UnboundedId
impl From<PeerId> for UnboundedId
source§fn from(id: PeerId) -> UnboundedId
fn from(id: PeerId) -> UnboundedId
Converts to this type from the input type.
source§impl Hash for UnboundedId
impl Hash for UnboundedId
source§impl<'a> IntoEvent<ConnectionId<'a>> for &'a UnboundedId
impl<'a> IntoEvent<ConnectionId<'a>> for &'a UnboundedId
fn into_event(self) -> ConnectionId<'a>
source§impl Ord for UnboundedId
impl Ord for UnboundedId
source§fn cmp(&self, other: &UnboundedId) -> Ordering
fn cmp(&self, other: &UnboundedId) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UnboundedId
impl PartialEq for UnboundedId
source§fn eq(&self, other: &UnboundedId) -> bool
fn eq(&self, other: &UnboundedId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UnboundedId
impl PartialOrd for UnboundedId
source§fn partial_cmp(&self, other: &UnboundedId) -> Option<Ordering>
fn partial_cmp(&self, other: &UnboundedId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&[u8]> for UnboundedId
impl TryFrom<&[u8]> for UnboundedId
impl Copy for UnboundedId
impl Eq for UnboundedId
Auto Trait Implementations§
impl Freeze for UnboundedId
impl RefUnwindSafe for UnboundedId
impl Send for UnboundedId
impl Sync for UnboundedId
impl Unpin for UnboundedId
impl UnwindSafe for UnboundedId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.