pub enum CanError {
DataTooLong,
InvalidFdLength,
}Expand description
What can go wrong building a CAN frame.
Variants§
DataTooLong
The data is longer than the frame kind allows (8 bytes for classic CAN, 64 for CAN-FD).
InvalidFdLength
The data length is not one a CAN-FD frame can carry. CAN-FD allows 0 to 8 bytes, then only 12, 16, 20, 24, 32, 48, and 64.
Trait Implementations§
impl Copy for CanError
impl Eq for CanError
Source§impl Error for CanError
impl Error for CanError
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 CanError
Auto Trait Implementations§
impl Freeze for CanError
impl RefUnwindSafe for CanError
impl Send for CanError
impl Sync for CanError
impl Unpin for CanError
impl UnsafeUnpin for CanError
impl UnwindSafe for CanError
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