pub struct QuicInitialPacketBuilder<'buffer, 'input> { /* private fields */ }Expand description
Builds a protected QUIC v1 or v2 Initial packet in caller-owned storage.
Implementations§
Source§impl<'buffer, 'input> QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> QuicInitialPacketBuilder<'buffer, 'input>
Sourcepub fn new(
destination: &'buffer mut [u8],
version: QuicVersion,
protected_low_bits: u8,
destination_connection_id: QuicConnectionId<'input>,
source_connection_id: QuicConnectionId<'input>,
token: &'input [u8],
protected_remainder: &'input [u8],
) -> Self
pub fn new( destination: &'buffer mut [u8], version: QuicVersion, protected_low_bits: u8, destination_connection_id: QuicConnectionId<'input>, source_connection_id: QuicConnectionId<'input>, token: &'input [u8], protected_remainder: &'input [u8], ) -> Self
Creates a builder with exact opaque Initial token and protected-remainder bytes.
Sourcepub fn with_token_length_len(self, length: QuicVarIntLen) -> Self
pub fn with_token_length_len(self, length: QuicVarIntLen) -> Self
Requests an explicit legal encoded width for the Initial token-length field.
Sourcepub fn with_length_len(self, length: QuicVarIntLen) -> Self
pub fn with_length_len(self, length: QuicVarIntLen) -> Self
Requests an explicit legal encoded width for the protected packet-length field.
Sourcepub fn build(
self,
) -> Result<QuicProtectedLongPacket<'buffer>, QuicPacketBuildError>
pub fn build( self, ) -> Result<QuicProtectedLongPacket<'buffer>, QuicPacketBuildError>
Validates all inputs and capacity before writing a complete protected Initial packet.
Auto Trait Implementations§
impl<'buffer, 'input> !UnwindSafe for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Freeze for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> RefUnwindSafe for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Send for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Sync for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Unpin for QuicInitialPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> UnsafeUnpin for QuicInitialPacketBuilder<'buffer, 'input>
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