pub struct Error {
pub error_code: ErrorCode,
pub data: BytesMut,
/* private fields */
}
Expand description
ERROR Frame (0x0B)
Error frames are used for errors on individual requests/streams as well as connection errors and in response to SETUP frames.
§Frame Contents
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID |
+-----------+-+-+---------------+-------------------------------+
|Frame Type |0|0| Flags |
+-----------+-+-+---------------+-------------------------------+
| Error Code |
+---------------------------------------------------------------+
Error Data
§Note
Unsed values in the range of 0x0001 to 0x00300 are reserved for future
protocol use. Values in the range of 0x00301
to 0xFFFFFFFE
are
reserved for application layer errors.
Fields§
§error_code: ErrorCode
Type of Error.
See ErrorCode
of valid Error Codes.
data: BytesMut
Error Data
Includes Payload describing error information. Error Data SHOULD b a UTF-8 encoded string. The string MUST NOT be null terminated.
Implementations§
Trait Implementations§
Source§impl Decoder for Error
impl Decoder for Error
Source§impl Encoder for Error
impl Encoder for Error
Source§impl FrameVariant for Error
impl FrameVariant for Error
Source§const FLAGS_MASK: FrameFlags
const FLAGS_MASK: FrameFlags
Mask that flags of a variant must be in.
Source§fn flags(&self) -> FrameFlags
fn flags(&self) -> FrameFlags
Gets the flags of the variant.
Source§const REQUIRED_FLAGS: FrameFlags = _
const REQUIRED_FLAGS: FrameFlags = _
Flags that must be set for a variant.
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