pub enum BusErrorKind {
BitError,
StuffError,
CrcError,
AckError,
FormError,
BusOff,
ErrorPassive,
ErrorWarning,
}Expand description
Bus error types.
These represent various types of errors that can occur on the CAN bus at the physical and data link layers.
§Examples
use canlink_hal::BusErrorKind;
let error = BusErrorKind::BitError;
assert_eq!(format!("{:?}", error), "BitError");Variants§
BitError
Bit error - transmitted bit differs from monitored bit
StuffError
Stuff error - more than 5 consecutive bits of same value
CrcError
CRC error - calculated CRC differs from received CRC
AckError
ACK error - no acknowledgment received
FormError
Form error - fixed-form bit field contains illegal value
BusOff
Bus-off - error counter exceeded threshold
ErrorPassive
Error passive - error counter in passive range
ErrorWarning
Error warning - error counter in warning range
Implementations§
Source§impl BusErrorKind
impl BusErrorKind
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get a human-readable description of the error.
§Examples
use canlink_hal::BusErrorKind;
let error = BusErrorKind::BitError;
assert_eq!(error.description(), "Bit error");Trait Implementations§
Source§impl Clone for BusErrorKind
impl Clone for BusErrorKind
Source§fn clone(&self) -> BusErrorKind
fn clone(&self) -> BusErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BusErrorKind
impl Debug for BusErrorKind
Source§impl Hash for BusErrorKind
impl Hash for BusErrorKind
Source§impl PartialEq for BusErrorKind
impl PartialEq for BusErrorKind
impl Copy for BusErrorKind
impl Eq for BusErrorKind
impl StructuralPartialEq for BusErrorKind
Auto Trait Implementations§
impl Freeze for BusErrorKind
impl RefUnwindSafe for BusErrorKind
impl Send for BusErrorKind
impl Sync for BusErrorKind
impl Unpin for BusErrorKind
impl UnsafeUnpin for BusErrorKind
impl UnwindSafe for BusErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.