Skip to main content

QuicPacketParseError

Enum QuicPacketParseError 

Source
pub enum QuicPacketParseError {
Show 16 variants EmptyDatagram, ShortHeaderContextRequired, WrongHeaderForm { expected_long: bool, first_byte: u8, }, Incomplete { required: usize, available: usize, }, LengthOverflow { offset: usize, length: usize, }, UnsupportedVersion { version: QuicVersion, }, WrongVersion { version: QuicVersion, }, EmptyVersionList, MisalignedVersionList { length: usize, }, NotRetry { packet_type: QuicLongPacketType, }, EmptyRetryToken, FixedBitNotSet { first_byte: u8, }, ConnectionIdTooLong { field: QuicConnectionIdField, length: usize, }, NotLengthDelimited { packet_type: QuicLongPacketType, }, LengthNotRepresentable { value: u64, }, ProtectedRemainderTooShort { minimum: u64, actual: u64, },
}
Expand description

Failure to parse a QUIC packet-header view.

Variants§

§

EmptyDatagram

A supplied UDP datagram contains no packet bytes.

§

ShortHeaderContextRequired

A short-header packet cannot be delimited without caller-supplied destination ID context.

§

WrongHeaderForm

The first byte has the opposite QUIC header form from the requested view.

Fields

§expected_long: bool

Whether the requested view requires the long-header form bit to be set.

§first_byte: u8

The observed first byte.

§

Incomplete

The input does not contain all bytes structurally required by the view.

Fields

§required: usize

Absolute byte count required from the start of the supplied input.

§available: usize

Bytes available in the supplied input.

§

LengthOverflow

A caller-supplied length cannot be represented when locating a field.

Fields

§offset: usize

Offset before adding the supplied length.

§length: usize

Length that could not be added to the offset.

§

UnsupportedVersion

A version-specific packet view does not define semantics for this QUIC version.

Fields

§version: QuicVersion

The raw unsupported version.

§

WrongVersion

A terminal packet was parsed by a view requiring a different exact version.

Fields

§version: QuicVersion

The observed raw version.

§

EmptyVersionList

A Version Negotiation packet has no advertised versions after its invariant prefix.

§

MisalignedVersionList

A Version Negotiation version list does not contain a whole number of four-byte versions.

Fields

§length: usize

The observed version-list byte length.

§

NotRetry

A supported-version terminal packet is not a Retry packet.

Fields

§packet_type: QuicLongPacketType

The observed semantic packet type.

§

EmptyRetryToken

A Retry packet has an integrity tag but no Retry Token bytes.

§

FixedBitNotSet

A supported-version long header has its required fixed bit cleared.

Fields

§first_byte: u8

The observed first byte.

§

ConnectionIdTooLong

A supported-version connection ID exceeds its 20-byte limit.

Fields

§field: QuicConnectionIdField

The overlong connection-ID field.

§length: usize

The observed byte length.

§

NotLengthDelimited

The packet type is terminal rather than length-delimited.

Fields

§packet_type: QuicLongPacketType

The terminal semantic packet type.

§

LengthNotRepresentable

A decoded length cannot be represented as usize on this target.

Fields

§value: u64

The decoded wire value.

§

ProtectedRemainderTooShort

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

Fields

§minimum: u64

Minimum protected remainder byte length.

§actual: u64

Decoded protected remainder byte length.

Trait Implementations§

Source§

impl Clone for QuicPacketParseError

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 QuicPacketParseError

Source§

impl Debug for QuicPacketParseError

Source§

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

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

impl Display for QuicPacketParseError

Source§

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

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

impl Eq for QuicPacketParseError

Source§

impl PartialEq for QuicPacketParseError

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 QuicPacketParseError

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.