Skip to main content

can_hal/
error.rs

1/// Shared error bound for all CAN backend errors.
2///
3/// Backends define their own concrete error types; this trait ensures they are
4/// compatible with the standard `Error` trait and are thread-safe.
5pub trait CanError: core::error::Error + Send + Sync + 'static {}
6
7/// Blanket implementation: any type satisfying the bounds automatically implements `CanError`.
8impl<T: core::error::Error + Send + Sync + 'static> CanError for T {}