#[non_exhaustive]pub enum Error {
TooShort {
need: usize,
got: usize,
},
UnknownMessageType(u8),
WrongMessageType {
expected: u8,
found: u8,
},
InvalidPack(&'static str),
InvalidAuthPage(&'static str),
OutOfRange(&'static str),
NotRemoteId,
BufferTooSmall {
need: usize,
got: usize,
},
}Expand description
Everything that can go wrong while decoding or encoding Remote ID data.
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.
TooShort
The input ended before the structure did.
UnknownMessageType(u8)
The header names a message type that the standard does not define.
WrongMessageType
A message of one type was handed to the decoder of another.
InvalidPack(&'static str)
A message pack broke one of its structural rules.
InvalidAuthPage(&'static str)
An authentication page header is inconsistent.
OutOfRange(&'static str)
A value is outside the range the field can carry, so it cannot be encoded.
NotRemoteId
The frame is well formed but carries no Remote ID payload.
BufferTooSmall
The output buffer is too small.
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.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 Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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