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
Incomplete
The input does not contain all bytes structurally required by the view.
Fields
LengthOverflow
A caller-supplied length cannot be represented when locating a field.
Fields
UnsupportedVersion
A version-specific packet view does not define semantics for this QUIC version.
Fields
version: QuicVersionThe raw unsupported version.
WrongVersion
A terminal packet was parsed by a view requiring a different exact version.
Fields
version: QuicVersionThe 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.
NotRetry
A supported-version terminal packet is not a Retry packet.
Fields
packet_type: QuicLongPacketTypeThe 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.
ConnectionIdTooLong
A supported-version connection ID exceeds its 20-byte limit.
Fields
field: QuicConnectionIdFieldThe overlong connection-ID field.
NotLengthDelimited
The packet type is terminal rather than length-delimited.
Fields
packet_type: QuicLongPacketTypeThe terminal semantic packet type.
LengthNotRepresentable
A decoded length cannot be represented as usize on this target.
ProtectedRemainderTooShort
A protected packet length is too short to contain a packet number and payload.