pub enum Error {
BufferTooShort {
need: usize,
have: usize,
},
NotLongHeader,
InvalidFixedBit,
NotInitialPacket(u8),
InvalidCidLength(u8),
UnsupportedVersion(u32),
DecryptionFailed(String),
TruncatedFrame {
offset: u64,
},
InvalidVarint,
}Expand description
Errors that can occur during QUIC packet parsing and decryption.
Variants§
BufferTooShort
The input buffer is shorter than required.
NotLongHeader
The packet does not have the long header form bit set.
InvalidFixedBit
The fixed bit (bit 6) of the first byte is not set to 1.
NotInitialPacket(u8)
The packet is a long header but not an Initial packet.
InvalidCidLength(u8)
A connection ID length field exceeds the protocol maximum of 20 bytes.
UnsupportedVersion(u32)
The QUIC version is not supported for decryption.
DecryptionFailed(String)
AEAD decryption or key derivation failed.
TruncatedFrame
A CRYPTO frame was truncated before its declared length.
InvalidVarint
The variable-length integer encoding is malformed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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