pub enum EnvelopeError {
UnsupportedVersion {
found: u32,
min: u32,
max: u32,
},
ChecksumMismatch,
Truncated {
expected: usize,
actual: usize,
},
TrailingBytes(usize),
PayloadTooLarge(usize),
}Expand description
Errors produced while verifying or decoding a CommandEnvelope.
Variants§
UnsupportedVersion
The format version is outside the supported range.
Fields
ChecksumMismatch
The stored checksum does not match the recomputed one.
Truncated
The byte slice ended before a complete envelope was read.
Fields
TrailingBytes(usize)
Extra bytes followed an otherwise complete envelope.
PayloadTooLarge(usize)
The payload exceeds MAX_COMMAND_PAYLOAD_BYTES.
Trait Implementations§
Source§impl Clone for EnvelopeError
impl Clone for EnvelopeError
Source§fn clone(&self) -> EnvelopeError
fn clone(&self) -> EnvelopeError
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 moreSource§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
impl Eq for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
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()
Source§impl From<EnvelopeError> for LogError
impl From<EnvelopeError> for LogError
Source§fn from(source: EnvelopeError) -> Self
fn from(source: EnvelopeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EnvelopeError
impl PartialEq for EnvelopeError
impl StructuralPartialEq for EnvelopeError
Auto Trait Implementations§
impl Freeze for EnvelopeError
impl RefUnwindSafe for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnsafeUnpin for EnvelopeError
impl UnwindSafe for EnvelopeError
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