pub struct ErrorCodeAttribute {
pub code: ErrorCode,
pub reason: Vec<u8>,
}Expand description
The ERROR-CODE attribute: a numeric code and a human-readable reason.
Fields§
§code: ErrorCodeThe numeric error code.
reason: Vec<u8>The reason phrase, as UTF-8 bytes.
Trait Implementations§
Source§impl Clone for ErrorCodeAttribute
impl Clone for ErrorCodeAttribute
Source§impl Debug for ErrorCodeAttribute
impl Debug for ErrorCodeAttribute
Source§impl Default for ErrorCodeAttribute
impl Default for ErrorCodeAttribute
Source§impl Display for ErrorCodeAttribute
impl Display for ErrorCodeAttribute
impl Eq for ErrorCodeAttribute
Source§impl Getter for ErrorCodeAttribute
impl Getter for ErrorCodeAttribute
Source§fn get_from(&mut self, m: &Message) -> Result<()>
fn get_from(&mut self, m: &Message) -> Result<()>
Decodes ERROR-CODE from m.
The reserved bits are ignored (RFC 8489 section 14.8). The reason phrase is taken as sent, whatever its length: it is diagnostic text.
§Errors
Fails when the attribute is absent or shorter than 4 bytes, or when the class is not 3 to 6 or the number not 0 to 99, which no error code has.
Source§impl PartialEq for ErrorCodeAttribute
impl PartialEq for ErrorCodeAttribute
Source§impl Setter for ErrorCodeAttribute
impl Setter for ErrorCodeAttribute
impl StructuralPartialEq for ErrorCodeAttribute
Auto Trait Implementations§
impl Forget for ErrorCodeAttribute
impl Freeze for ErrorCodeAttribute
impl Move for ErrorCodeAttribute
impl RefUnwindSafe for ErrorCodeAttribute
impl Send for ErrorCodeAttributewhere
RawVecInner: Send,
impl Sync for ErrorCodeAttributewhere
RawVecInner: Sync,
impl Unpin for ErrorCodeAttribute
impl UnsafeUnpin for ErrorCodeAttribute
impl UnwindSafe for ErrorCodeAttributewhere
RawVecInner: UnwindSafe,
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