Skip to main content

QuicPacketBuildError

Enum QuicPacketBuildError 

Source
pub enum QuicPacketBuildError {
    UnusedBitsOutOfRange {
        maximum: u8,
        actual: u8,
    },
    ProtectedLowBitsOutOfRange {
        maximum: u8,
        actual: u8,
    },
    UnsupportedVersion {
        version: QuicVersion,
    },
    ConnectionIdTooLong {
        field: QuicConnectionIdField,
        maximum: usize,
        actual: usize,
    },
    EmptyVersionList,
    EmptyRetryToken,
    ProtectedRemainderTooShort {
        minimum: usize,
        actual: usize,
    },
    VarInt {
        field: QuicPacketBuildField,
        error: QuicVarIntBuildError,
    },
    LengthOverflow {
        component: &'static str,
        offset: usize,
        length: usize,
    },
    BufferTooShort {
        required: usize,
        available: usize,
    },
}
Expand description

Failure to build a QUIC packet in caller-owned storage.

Variants§

§

UnusedBitsOutOfRange

The supplied unused-bit value exceeds the packet form’s maximum.

Fields

§maximum: u8

Greatest permitted unused-bit value.

§actual: u8

Supplied unused-bit value.

§

ProtectedLowBitsOutOfRange

The supplied protected-low-bit value exceeds the maximum permitted value.

Fields

§maximum: u8

Greatest permitted protected-low-bit value.

§actual: u8

Supplied protected-low-bit value.

§

UnsupportedVersion

Packet construction supports only QUIC v1 and v2.

Fields

§version: QuicVersion

Supplied raw version.

§

ConnectionIdTooLong

A connection ID cannot be represented by this packet form.

Fields

§field: QuicConnectionIdField

Connection-ID field that is too long.

§maximum: usize

Greatest permitted byte length.

§actual: usize

Supplied byte length.

§

EmptyVersionList

A Version Negotiation packet requires at least one advertised version.

§

EmptyRetryToken

A Retry packet requires at least one token byte.

§

ProtectedRemainderTooShort

A protected packet remainder is too short to contain a packet number and payload.

Fields

§minimum: usize

Minimum protected remainder byte length.

§actual: usize

Supplied protected remainder byte length.

§

VarInt

A packet variable-length field cannot represent its requested value or width.

Fields

§field: QuicPacketBuildField

Field that could not be encoded.

§error: QuicVarIntBuildError

Exact variable-integer construction failure.

§

LengthOverflow

Packet-size arithmetic cannot represent an intermediate total.

Fields

§component: &'static str

Named packet-size component being added.

§offset: usize

Accumulated byte length before adding the component.

§length: usize

Component byte length.

§

BufferTooShort

The caller buffer cannot contain the complete packet.

Fields

§required: usize

Complete packet byte length required.

§available: usize

Bytes available in the caller buffer.

Trait Implementations§

Source§

impl Clone for QuicPacketBuildError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for QuicPacketBuildError

Source§

impl Debug for QuicPacketBuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for QuicPacketBuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for QuicPacketBuildError

Source§

impl PartialEq for QuicPacketBuildError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QuicPacketBuildError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.