Enum WireError
#[non_exhaustive]pub enum WireError {
Eof,
Utf8,
Tag(u32),
Length,
Depth,
Invalid(&'static str),
Trailing,
}Expand description
Why a buffer is not a value of the type it was read as.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Eof
The buffer ends inside a value.
Utf8
A string is not UTF-8.
Tag(u32)
An enum case or option tag the type does not have.
Length
A length longer than the rest of the buffer could hold.
Depth
Values nested deeper than MAX_DEPTH.
Invalid(&'static str)
A value its type refuses (an unknown key, a count out of range), and why.
Trailing
Bytes left over after the value.
Trait Implementations§
impl Copy for WireError
impl Eq for WireError
§impl Error for WireError
impl Error for WireError
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()
impl StructuralPartialEq for WireError
Auto Trait Implementations§
impl Freeze for WireError
impl RefUnwindSafe for WireError
impl Send for WireError
impl Sync for WireError
impl Unpin for WireError
impl UnsafeUnpin for WireError
impl UnwindSafe for WireError
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