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.
ProtectedLowBitsOutOfRange
The supplied protected-low-bit value exceeds the maximum permitted value.
Fields
UnsupportedVersion
Packet construction supports only QUIC v1 and v2.
Fields
version: QuicVersionSupplied raw version.
ConnectionIdTooLong
A connection ID cannot be represented by this packet form.
Fields
field: QuicConnectionIdFieldConnection-ID field that is too long.
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
VarInt
A packet variable-length field cannot represent its requested value or width.
Fields
field: QuicPacketBuildFieldField that could not be encoded.
error: QuicVarIntBuildErrorExact variable-integer construction failure.
LengthOverflow
Packet-size arithmetic cannot represent an intermediate total.
Fields
BufferTooShort
The caller buffer cannot contain the complete packet.