Struct s2n_quic_transport::connection::id::PeerId
source · [−]pub struct PeerId { /* private fields */ }
Expand description
Uniquely identifies a QUIC connection between 2 peers
Implementations
sourceimpl PeerId
impl PeerId
sourcepub fn try_from_bytes(bytes: &[u8]) -> Option<PeerId>
pub fn try_from_bytes(bytes: &[u8]) -> Option<PeerId>
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
sourceimpl<'a> DecoderValue<'a> for PeerId
impl<'a> DecoderValue<'a> for PeerId
fn decode(
buffer: DecoderBuffer<'a>
) -> Result<(PeerId, DecoderBuffer<'a>), DecoderError>
sourceimpl<'a> DecoderValueMut<'a> for PeerId
impl<'a> DecoderValueMut<'a> for PeerId
fn decode_mut(
buffer: DecoderBufferMut<'a>
) -> Result<(PeerId, DecoderBufferMut<'a>), DecoderError>
sourceimpl EncoderValue for PeerId
impl EncoderValue for PeerId
sourcefn 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
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E>(&self, encoder: &E) -> usize where
E: Encoder,
fn encoding_size_for_encoder<E>(&self, encoder: &E) -> usize where
E: Encoder,
Returns the encoding size for the given encoder’s capacity
sourceimpl From<PeerId> for UnboundedId
impl From<PeerId> for UnboundedId
sourcefn from(id: PeerId) -> UnboundedId
fn from(id: PeerId) -> UnboundedId
Converts to this type from the input type.
sourceimpl<'a> IntoEvent<ConnectionId<'a>> for &'a PeerId
impl<'a> IntoEvent<ConnectionId<'a>> for &'a PeerId
fn into_event(self) -> ConnectionId<'a>
sourceimpl Ord for PeerId
impl Ord for PeerId
sourceimpl PartialOrd<PeerId> for PeerId
impl PartialOrd<PeerId> for PeerId
sourcefn partial_cmp(&self, other: &PeerId) -> Option<Ordering>
fn partial_cmp(&self, other: &PeerId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for PeerId
impl Eq for PeerId
impl StructuralEq for PeerId
impl StructuralPartialEq for PeerId
Auto Trait Implementations
impl RefUnwindSafe for PeerId
impl Send for PeerId
impl Sync for PeerId
impl Unpin for PeerId
impl UnwindSafe for PeerId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> PacketPayloadEncoder for T where
T: EncoderValue,
impl<T> PacketPayloadEncoder for T where
T: EncoderValue,
sourcefn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usize where
E: Encoder,
fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usize where
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. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more