Struct tokio_socketcan::CANFrame [−][src]
CANFrame
Uses the same memory layout as the underlying kernel struct for performance reasons.
Implementations
impl CANFrame
[src]
pub fn new(
id: u32,
data: &[u8],
rtr: bool,
err: bool
) -> Result<CANFrame, ConstructionError>
[src]
id: u32,
data: &[u8],
rtr: bool,
err: bool
) -> Result<CANFrame, ConstructionError>
pub fn id(&self) -> u32
[src]
Return the actual CAN ID (without EFF/RTR/ERR flags)
pub fn err(&self) -> u32
[src]
Return the error message
pub fn is_extended(&self) -> bool
[src]
Check if frame uses 29 bit extended frame format
pub fn is_error(&self) -> bool
[src]
Check if frame is an error message
pub fn is_rtr(&self) -> bool
[src]
Check if frame is a remote transmission request
pub fn data(&self) -> &[u8]
[src]
A slice into the actual data. Slice will always be <= 8 bytes in length
pub fn error(&self) -> Result<CANError, CANErrorDecodingFailure>
[src]
Trait Implementations
impl Clone for CANFrame
[src]
impl Copy for CANFrame
[src]
impl Debug for CANFrame
[src]
impl Sink<CANFrame> for CANSocket
[src]
type Error = Error
The type of value produced by the sink when an error occurs.
fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_flush(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_close(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn start_send(self: Pin<&mut Self>, item: CANFrame) -> Result<(), Self::Error>
[src]
impl UpperHex for CANFrame
[src]
Auto Trait Implementations
impl RefUnwindSafe for CANFrame
[src]
impl Send for CANFrame
[src]
impl Sync for CANFrame
[src]
impl Unpin for CANFrame
[src]
impl UnwindSafe for CANFrame
[src]
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,