pub struct CanRemoteFrame(/* private fields */);Expand description
The classic CAN 2.0 remote request frame.
This is is meant to request a transmission by another node on the bus. It contain no data.
This is highly compatible with the can_frame from libc.
(ref)
Implementations§
Trait Implementations§
Source§impl AsPtr for CanRemoteFrame
impl AsPtr for CanRemoteFrame
Source§impl AsRef<can_frame> for CanRemoteFrame
impl AsRef<can_frame> for CanRemoteFrame
Source§impl Clone for CanRemoteFrame
impl Clone for CanRemoteFrame
Source§fn clone(&self) -> CanRemoteFrame
fn clone(&self) -> CanRemoteFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CanRemoteFrame
Source§impl Debug for CanRemoteFrame
impl Debug for CanRemoteFrame
Source§impl Default for CanRemoteFrame
impl Default for CanRemoteFrame
Source§impl<'de> Deserialize<'de> for CanRemoteFrame
Available on crate feature serde only.
impl<'de> Deserialize<'de> for CanRemoteFrame
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CanRemoteFrame
Source§impl Frame for CanRemoteFrame
impl Frame for CanRemoteFrame
Source§fn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
fn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
Create a new remote transmission request frame.
This will set the RTR flag in the CAN ID word.
Source§fn is_extended(&self) -> bool
fn is_extended(&self) -> bool
Check if frame uses 29-bit extended ID format.
Source§fn is_remote_frame(&self) -> bool
fn is_remote_frame(&self) -> bool
Check if frame is a remote transmission request.
Source§fn data(&self) -> &[u8] ⓘ
fn data(&self) -> &[u8] ⓘ
A slice into the actual data.
Remote frames carry no payload by spec — only the DLC is meaningful.
This always returns an empty slice; use dlc() to read
the requested length.
Source§fn is_standard(&self) -> bool
fn is_standard(&self) -> bool
Source§fn is_data_frame(&self) -> bool
fn is_data_frame(&self) -> bool
Source§impl Frame for CanRemoteFrame
impl Frame for CanRemoteFrame
Source§fn set_id(&mut self, id: impl Into<Id>)
fn set_id(&mut self, id: impl Into<Id>)
Sets the CAN ID for the frame.
This will set the RTR flag in the CAN ID word.
Source§fn set_data(&mut self, data: &[u8]) -> Result<(), ConstructionError>
fn set_data(&mut self, data: &[u8]) -> Result<(), ConstructionError>
Sets the data payload of the frame. For the Remote frame, this just updates the DLC to the length of the data slice.
Source§fn from_raw_id(id: u32, data: &[u8]) -> Option<Self>
fn from_raw_id(id: u32, data: &[u8]) -> Option<Self>
Source§fn remote_from_raw_id(id: u32, dlc: usize) -> Option<Self>
fn remote_from_raw_id(id: u32, dlc: usize) -> Option<Self>
Source§fn is_error_frame(&self) -> bool
fn is_error_frame(&self) -> bool
Source§impl From<CanRemoteFrame> for CanAnyFrame
impl From<CanRemoteFrame> for CanAnyFrame
Source§fn from(frame: CanRemoteFrame) -> Self
fn from(frame: CanRemoteFrame) -> Self
Source§impl From<CanRemoteFrame> for CanFrame
impl From<CanRemoteFrame> for CanFrame
Source§fn from(frame: CanRemoteFrame) -> Self
fn from(frame: CanRemoteFrame) -> Self
Create a CanFrame from a remote frame
Source§impl From<CanRemoteFrame> for CanRemoteFrameRepr
Available on crate feature serde only.
impl From<CanRemoteFrame> for CanRemoteFrameRepr
serde only.Source§fn from(frame: CanRemoteFrame) -> Self
fn from(frame: CanRemoteFrame) -> Self
Source§impl Hash for CanRemoteFrame
impl Hash for CanRemoteFrame
Source§impl PartialEq for CanRemoteFrame
impl PartialEq for CanRemoteFrame
Source§impl Serialize for CanRemoteFrame
Available on crate feature serde only.
impl Serialize for CanRemoteFrame
serde only.impl StructuralPartialEq for CanRemoteFrame
Source§impl TryFrom<CanAnyFrame> for CanRemoteFrame
impl TryFrom<CanAnyFrame> for CanRemoteFrame
Source§type Error = ConstructionError
type Error = ConstructionError
Source§impl TryFrom<CanFrame> for CanRemoteFrame
impl TryFrom<CanFrame> for CanRemoteFrame
Source§impl TryFrom<CanRemoteFrameRepr> for CanRemoteFrame
Available on crate feature serde only.
impl TryFrom<CanRemoteFrameRepr> for CanRemoteFrame
serde only.Source§type Error = ConstructionError
type Error = ConstructionError
Source§impl TryFrom<can_frame> for CanRemoteFrame
impl TryFrom<can_frame> for CanRemoteFrame
Source§fn try_from(frame: can_frame) -> Result<Self, Self::Error>
fn try_from(frame: can_frame) -> Result<Self, Self::Error>
Try to create a CanRemoteFrame from a C can_frame
This will only succeed the C frame is marked as a remote frame. The
requested length is clamped to CAN_MAX_DLEN, so a raw struct cannot
smuggle in a DLC that the type’s own constructors reject.
Source§type Error = ConstructionError
type Error = ConstructionError
Auto Trait Implementations§
impl Freeze for CanRemoteFrame
impl RefUnwindSafe for CanRemoteFrame
impl Send for CanRemoteFrame
impl Sync for CanRemoteFrame
impl Unpin for CanRemoteFrame
impl UnsafeUnpin for CanRemoteFrame
impl UnwindSafe for CanRemoteFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ControllerSpecificErrorInformation for Twhere
T: Frame,
impl<T> ControllerSpecificErrorInformation for Twhere
T: Frame,
Source§fn get_ctrl_err(&self) -> Option<&[u8]>
fn get_ctrl_err(&self) -> Option<&[u8]>
Get the controller specific error information.