pub enum PayloadError {
TooShort,
BadHeader,
WrongKind,
WrongSchema {
expected: u32,
found: u32,
},
WrongLength {
value: String,
expected: usize,
found: usize,
},
NotFinite {
value: String,
index: usize,
},
OutOfBounds {
value: String,
index: usize,
found: f32,
min: f32,
max: f32,
},
TrailingBytes,
Mismatch(String),
}Expand description
Why a payload was rejected.
Variants§
TooShort
BadHeader
WrongKind
WrongSchema
WrongLength
NotFinite
OutOfBounds
TrailingBytes
Mismatch(String)
Encoding was given values that don’t match the declaration.
Trait Implementations§
Source§impl Clone for PayloadError
impl Clone for PayloadError
Source§impl Debug for PayloadError
impl Debug for PayloadError
Source§impl Display for PayloadError
impl Display for PayloadError
Source§impl Error for PayloadError
impl Error for PayloadError
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 PayloadError
impl PartialEq for PayloadError
impl StructuralPartialEq for PayloadError
Auto Trait Implementations§
impl Freeze for PayloadError
impl RefUnwindSafe for PayloadError
impl Send for PayloadError
impl Sync for PayloadError
impl Unpin for PayloadError
impl UnsafeUnpin for PayloadError
impl UnwindSafe for PayloadError
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