pub struct QuicError { /* private fields */ }
Expand description
QUIC transport error.
Its definition conforms to the usage of ConnectionCloseFrame
.
A value of 0 (equivalent to the mention of the PADDING frame) is used when the frame type is unknown.
Implementations§
Source§impl QuicError
impl QuicError
Sourcepub fn new<T>(
kind: ErrorKind,
frame_type: ErrorFrameType,
reason: T,
) -> QuicError
pub fn new<T>( kind: ErrorKind, frame_type: ErrorFrameType, reason: T, ) -> QuicError
Create a new error with the given kind, frame type, and reason. The frame type is the one that triggered this error.
Sourcepub fn with_default_fty<T>(kind: ErrorKind, reason: T) -> QuicError
pub fn with_default_fty<T>(kind: ErrorKind, reason: T) -> QuicError
Create a new error with unknown frame type, and
the FrameType::Padding
type will be used by default.
Sourcepub fn frame_type(&self) -> ErrorFrameType
pub fn frame_type(&self) -> ErrorFrameType
Return the frame type that triggered this error.
Trait Implementations§
Source§impl Error for QuicError
impl Error for QuicError
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()
impl Eq for QuicError
impl StructuralPartialEq for QuicError
Auto Trait Implementations§
impl Freeze for QuicError
impl RefUnwindSafe for QuicError
impl Send for QuicError
impl Sync for QuicError
impl Unpin for QuicError
impl UnwindSafe for QuicError
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