pub trait CanFrame: Send + Sync {
type Channel: Display;
Show 22 methods
// Required methods
fn new(id: impl Into<Id>, data: &[u8]) -> Option<Self>
where Self: Sized;
fn new_remote(id: impl Into<Id>, len: usize) -> Option<Self>
where Self: Sized;
fn timestamp(&self) -> u64;
fn set_timestamp(&mut self, value: Option<u64>) -> &mut Self
where Self: Sized;
fn id(&self) -> Id;
fn can_type(&self) -> Type;
fn set_can_type(&mut self, type: Type) -> &mut Self
where Self: Sized;
fn is_remote(&self) -> bool;
fn is_extended(&self) -> bool;
fn direct(&self) -> Direct;
fn set_direct(&mut self, direct: Direct) -> &mut Self
where Self: Sized;
fn is_bitrate_switch(&self) -> bool;
fn set_bitrate_switch(&mut self, value: bool) -> &mut Self
where Self: Sized;
fn is_error_frame(&self) -> bool;
fn set_error_frame(&mut self, value: bool) -> &mut Self
where Self: Sized;
fn is_esi(&self) -> bool;
fn set_esi(&mut self, value: bool) -> &mut Self
where Self: Sized;
fn channel(&self) -> Self::Channel;
fn set_channel(&mut self, value: Self::Channel) -> &mut Self
where Self: Sized;
fn data(&self) -> &[u8] ⓘ;
fn length(&self) -> usize;
// Provided method
fn dlc(&self) -> isize { ... }
}Expand description
CAN 2.0 | CAN 1.0