pub struct VersionNegotiation<'a, SupportedVersions> {
pub tag: u8,
pub destination_connection_id: &'a [u8],
pub source_connection_id: &'a [u8],
pub supported_versions: SupportedVersions,
}Fields
tag: u8destination_connection_id: &'a [u8]source_connection_id: &'a [u8]supported_versions: SupportedVersionsImplementations
sourceimpl<'a> VersionNegotiation<'a, &'a [u8]>
impl<'a> VersionNegotiation<'a, &'a [u8]>
pub fn decode(
tag: u8,
_version: u32,
buffer: DecoderBufferMut<'_>
) -> DecoderBufferMutResult<'_, VersionNegotiation<'_, &[u8]>>
pub fn iter(&'a self) -> VersionNegotiationIterator<'a>ⓘNotable traits for VersionNegotiationIterator<'a>impl<'a> Iterator for VersionNegotiationIterator<'a> type Item = u32;
pub fn destination_connection_id(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
pub fn source_connection_id(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
sourceimpl<'a, SupportedVersions: EncoderValue> VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: EncoderValue> VersionNegotiation<'a, SupportedVersions>
pub fn from_initial(
initial_packet: &'a ProtectedInitial<'_>,
supported_versions: SupportedVersions
) -> Self
Trait Implementations
sourceimpl<'a, SupportedVersions: Clone> Clone for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: Clone> Clone for VersionNegotiation<'a, SupportedVersions>
sourcefn clone(&self) -> VersionNegotiation<'a, SupportedVersions>
fn clone(&self) -> VersionNegotiation<'a, SupportedVersions>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a, SupportedVersions: Debug> Debug for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: Debug> Debug for VersionNegotiation<'a, SupportedVersions>
sourceimpl<'a, SupportedVersions: EncoderValue> EncoderValue for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: EncoderValue> EncoderValue for VersionNegotiation<'a, SupportedVersions>
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<'a, SupportedVersions: Hash> Hash for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: Hash> Hash for VersionNegotiation<'a, SupportedVersions>
sourceimpl<'a, SupportedVersions: Ord> Ord for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: Ord> Ord for VersionNegotiation<'a, SupportedVersions>
sourceimpl<'a, SupportedVersions: PartialEq> PartialEq<VersionNegotiation<'a, SupportedVersions>> for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: PartialEq> PartialEq<VersionNegotiation<'a, SupportedVersions>> for VersionNegotiation<'a, SupportedVersions>
sourcefn eq(&self, other: &VersionNegotiation<'a, SupportedVersions>) -> bool
fn eq(&self, other: &VersionNegotiation<'a, SupportedVersions>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &VersionNegotiation<'a, SupportedVersions>) -> bool
fn ne(&self, other: &VersionNegotiation<'a, SupportedVersions>) -> bool
This method tests for !=.
sourceimpl<'a, SupportedVersions: PartialOrd> PartialOrd<VersionNegotiation<'a, SupportedVersions>> for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: PartialOrd> PartialOrd<VersionNegotiation<'a, SupportedVersions>> for VersionNegotiation<'a, SupportedVersions>
sourcefn partial_cmp(
&self,
other: &VersionNegotiation<'a, SupportedVersions>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &VersionNegotiation<'a, SupportedVersions>
) -> 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<'a, SupportedVersions: Copy> Copy for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions: Eq> Eq for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions> StructuralEq for VersionNegotiation<'a, SupportedVersions>
impl<'a, SupportedVersions> StructuralPartialEq for VersionNegotiation<'a, SupportedVersions>
Auto Trait Implementations
impl<'a, SupportedVersions> RefUnwindSafe for VersionNegotiation<'a, SupportedVersions> where
SupportedVersions: RefUnwindSafe,
impl<'a, SupportedVersions> Send for VersionNegotiation<'a, SupportedVersions> where
SupportedVersions: Send,
impl<'a, SupportedVersions> Sync for VersionNegotiation<'a, SupportedVersions> where
SupportedVersions: Sync,
impl<'a, SupportedVersions> Unpin for VersionNegotiation<'a, SupportedVersions> where
SupportedVersions: Unpin,
impl<'a, SupportedVersions> UnwindSafe for VersionNegotiation<'a, SupportedVersions> where
SupportedVersions: UnwindSafe,
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