pub enum PackError {
BufferTooSmall {
need: usize,
},
InvalidPayloadSize {
expected: usize,
found: usize,
},
MarshalerError(MarshalerError),
}Expand description
Errors returned by Messager::pack.
Variants§
BufferTooSmall
The destination buffer is too small to hold the complete frame.
Fields
InvalidPayloadSize
The marshaler returned a byte count that does not equal
Marshaler::PAYLOAD_SIZE.
This indicates a broken Marshaler implementation.
Fields
MarshalerError(MarshalerError)
The marshaler returned an error.
Trait Implementations§
Source§impl Error for PackError
impl Error for PackError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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<MarshalerError> for PackError
impl From<MarshalerError> for PackError
Source§fn from(err: MarshalerError) -> Self
fn from(err: MarshalerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PackError
impl RefUnwindSafe for PackError
impl Send for PackError
impl Sync for PackError
impl Unpin for PackError
impl UnsafeUnpin for PackError
impl UnwindSafe for PackError
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