pub enum MarshalError {
ShortBuffer {
expected: usize,
got: usize,
},
InvalidEncoding,
}Expand description
Error returned when Marshal::unmarshal cannot reconstruct a
value from the source buffer.
Variants§
ShortBuffer
The source buffer is shorter than PAYLOAD_BYTES.
InvalidEncoding
The source bytes do not encode a valid value of this type
(e.g. a bool byte that is neither 0 nor 1).
Trait Implementations§
Source§impl Clone for MarshalError
impl Clone for MarshalError
Source§fn clone(&self) -> MarshalError
fn clone(&self) -> MarshalError
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 MarshalError
impl Debug for MarshalError
Source§impl Display for MarshalError
impl Display for MarshalError
impl Eq for MarshalError
Source§impl Error for MarshalError
impl Error for MarshalError
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 PartialEq for MarshalError
impl PartialEq for MarshalError
impl StructuralPartialEq for MarshalError
Auto Trait Implementations§
impl Freeze for MarshalError
impl RefUnwindSafe for MarshalError
impl Send for MarshalError
impl Sync for MarshalError
impl Unpin for MarshalError
impl UnsafeUnpin for MarshalError
impl UnwindSafe for MarshalError
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