#[repr(C, packed(1))]pub struct ErrorResponse {
pub category: u8,
pub code: u8,
pub context_len: u16,
}Expand description
Binary error response
Fields§
§category: u8Error category (1 byte)
code: u8Error code within category (1 byte)
context_len: u16Additional context length (2 bytes)
Implementations§
Source§impl ErrorResponse
impl ErrorResponse
pub const SIZE: usize = 4
pub fn new(category: u8, code: u8) -> Self
pub fn from_dcp_error(err: DCPError) -> Self
pub fn from_security_error(err: SecurityError) -> Self
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§fn clone(&self) -> ErrorResponse
fn clone(&self) -> ErrorResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ErrorResponse
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnsafeUnpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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