can-hal-rs 0.3.4

Hardware-agnostic traits for CAN bus communication
Documentation
1
2
3
4
5
6
7
8
/// Shared error bound for all CAN backend errors.
///
/// Backends define their own concrete error types; this trait ensures they are
/// compatible with the standard `Error` trait and are thread-safe.
pub trait CanError: core::error::Error + Send + Sync + 'static {}

/// Blanket implementation: any type satisfying the bounds automatically implements `CanError`.
impl<T: core::error::Error + Send + Sync + 'static> CanError for T {}