pub struct QuicShortPacketBuilder<'buffer, 'input> { /* private fields */ }Expand description
Builds a complete protected QUIC short-header packet in caller-owned storage.
The protected low five bits and protected remainder are copied exactly without interpreting header-protection, packet-number, or payload semantics.
Implementations§
Source§impl<'buffer, 'input> QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> QuicShortPacketBuilder<'buffer, 'input>
Sourcepub fn new(
destination: &'buffer mut [u8],
spin: bool,
protected_low_bits: u8,
destination_connection_id: QuicConnectionId<'input>,
protected_remainder: &'input [u8],
) -> Self
pub fn new( destination: &'buffer mut [u8], spin: bool, protected_low_bits: u8, destination_connection_id: QuicConnectionId<'input>, protected_remainder: &'input [u8], ) -> Self
Creates a builder with exact opaque short-header protected bytes.
Sourcepub fn build(self) -> Result<QuicShortHeader<'buffer>, QuicPacketBuildError>
pub fn build(self) -> Result<QuicShortHeader<'buffer>, QuicPacketBuildError>
Validates all inputs and capacity before writing a complete protected short packet.
Auto Trait Implementations§
impl<'buffer, 'input> !UnwindSafe for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Freeze for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> RefUnwindSafe for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Send for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Sync for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> Unpin for QuicShortPacketBuilder<'buffer, 'input>
impl<'buffer, 'input> UnsafeUnpin for QuicShortPacketBuilder<'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