pub struct QuicVersionNegotiationPacket<'a> { /* private fields */ }Expand description
A borrowed QUIC Version Negotiation packet occupying its complete supplied datagram slice.
This view preserves the arbitrary lower seven bits of the first byte, connection-ID lengths permitted by the invariant header, and every four-byte advertised version without applying endpoint version-selection policy.
Implementations§
Source§impl<'a> QuicVersionNegotiationPacket<'a>
impl<'a> QuicVersionNegotiationPacket<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, QuicPacketParseError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, QuicPacketParseError>
Parses a complete Version Negotiation terminal packet.
Sourcepub const fn header(self) -> QuicLongHeader<'a>
pub const fn header(self) -> QuicLongHeader<'a>
Returns the accepted invariant long-header prefix.
Sourcepub const fn version_list_bytes(self) -> &'a [u8]
pub const fn version_list_bytes(self) -> &'a [u8]
Returns the exact raw four-byte version-list bytes.
Sourcepub const fn versions(self) -> QuicVersionIter<'a> ⓘ
pub const fn versions(self) -> QuicVersionIter<'a> ⓘ
Returns an exact-size iterator over advertised versions in wire order.
Trait Implementations§
Source§impl<'a> Clone for QuicVersionNegotiationPacket<'a>
impl<'a> Clone for QuicVersionNegotiationPacket<'a>
impl<'a> Copy for QuicVersionNegotiationPacket<'a>
Source§impl<'a> Debug for QuicVersionNegotiationPacket<'a>
impl<'a> Debug for QuicVersionNegotiationPacket<'a>
impl<'a> Eq for QuicVersionNegotiationPacket<'a>
Source§impl<'a> PartialEq for QuicVersionNegotiationPacket<'a>
impl<'a> PartialEq for QuicVersionNegotiationPacket<'a>
impl<'a> StructuralPartialEq for QuicVersionNegotiationPacket<'a>
Auto Trait Implementations§
impl<'a> Freeze for QuicVersionNegotiationPacket<'a>
impl<'a> RefUnwindSafe for QuicVersionNegotiationPacket<'a>
impl<'a> Send for QuicVersionNegotiationPacket<'a>
impl<'a> Sync for QuicVersionNegotiationPacket<'a>
impl<'a> Unpin for QuicVersionNegotiationPacket<'a>
impl<'a> UnsafeUnpin for QuicVersionNegotiationPacket<'a>
impl<'a> UnwindSafe for QuicVersionNegotiationPacket<'a>
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