[−][src]Struct bxcan::Frame
A CAN data or remote frame.
Implementations
impl Frame
[src]
pub fn new_data(id: Id, data: Data) -> Self
[src]
Creates a new data frame.
pub fn new_remote(id: Id, dlc: u8) -> Result<Frame, ()>
[src]
Creates a new remote frame with configurable data length code (DLC).
pub fn is_extended(&self) -> bool
[src]
Returns true if this frame is an extended frame.
pub fn is_standard(&self) -> bool
[src]
Returns true if this frame is a standard frame.
pub fn is_remote_frame(&self) -> bool
[src]
Returns true if this frame is a remote frame.
pub fn is_data_frame(&self) -> bool
[src]
Returns true if this frame is a data frame.
pub fn id(&self) -> Id
[src]
Returns the frame identifier.
pub fn priority(&self) -> FramePriority
[src]
Returns the priority of this frame.
pub fn dlc(&self) -> u8
[src]
Returns the data length code (DLC) which is in the range 0..8.
For data frames the DLC value always matches the length of the data. Remote frames do not carry any data, yet the DLC can be greater than 0.
pub fn data(&self) -> Option<&Data>
[src]
Returns the frame data (0..8 bytes in length) if this is a data frame.
If this is a remote frame, returns None
.
Trait Implementations
impl Clone for Frame
[src]
impl Debug for Frame
[src]
impl Eq for Frame
[src]
impl Format for Frame
[src]
impl PartialEq<Frame> for Frame
[src]
impl StructuralEq for Frame
[src]
impl StructuralPartialEq for Frame
[src]
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,