#[non_exhaustive]pub enum CanDecodeError {
IncorrectId,
IncorrectBufferSize,
OutOfRange {
name: &'static str,
ty: &'static str,
message: &'static str,
},
Invalid {
message: &'static str,
},
}
Expand description
Error decoding a CAN frame.
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.
IncorrectId
The frame given to deserialize from had the wrong id.
IncorrectBufferSize
The frame given to deserialize from had the wrong amount of data.
OutOfRange
Value was out of range.
Fields
Invalid
Validation failure.
Implementations§
Source§impl CanDecodeError
impl CanDecodeError
Sourcepub fn invalid(message: &'static str) -> CanDecodeError
pub fn invalid(message: &'static str) -> CanDecodeError
Create an instance of Self::Invalid
.
Trait Implementations§
Source§impl Debug for CanDecodeError
impl Debug for CanDecodeError
Source§impl Display for CanDecodeError
impl Display for CanDecodeError
Source§impl Error for CanDecodeError
impl Error for CanDecodeError
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()
Auto Trait Implementations§
impl Freeze for CanDecodeError
impl RefUnwindSafe for CanDecodeError
impl Send for CanDecodeError
impl Sync for CanDecodeError
impl Unpin for CanDecodeError
impl UnwindSafe for CanDecodeError
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