pub enum CapsuleError {
UnexpectedEnd,
InvalidUtf8,
MessageTooLong,
UnknownType(VarInt),
VarInt(VarIntUnexpectedEnd),
Io(Arc<Error>),
}Expand description
Errors returned by capsule encoding and decoding.
Variants§
UnexpectedEnd
Input ended before the full capsule payload could be read.
InvalidUtf8
CLOSE_WEBTRANSPORT_SESSION reason bytes were not valid UTF-8.
MessageTooLong
Capsule payload exceeded the implementation message limit.
UnknownType(VarInt)
Capsule type is unsupported by this implementation.
VarInt(VarIntUnexpectedEnd)
Failed to decode a QUIC variable-length integer.
Io(Arc<Error>)
I/O error while reading from or writing to a stream.
Trait Implementations§
Source§impl Clone for CapsuleError
impl Clone for CapsuleError
Source§fn clone(&self) -> CapsuleError
fn clone(&self) -> CapsuleError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapsuleError
impl Debug for CapsuleError
Source§impl Display for CapsuleError
impl Display for CapsuleError
Source§impl Error for CapsuleError
impl Error for CapsuleError
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()
Source§impl From<Error> for CapsuleError
impl From<Error> for CapsuleError
Source§impl From<VarIntUnexpectedEnd> for CapsuleError
impl From<VarIntUnexpectedEnd> for CapsuleError
Source§fn from(source: VarIntUnexpectedEnd) -> Self
fn from(source: VarIntUnexpectedEnd) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CapsuleError
impl !RefUnwindSafe for CapsuleError
impl Send for CapsuleError
impl Sync for CapsuleError
impl Unpin for CapsuleError
impl UnsafeUnpin for CapsuleError
impl !UnwindSafe for CapsuleError
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