pub struct CanMessage {
pub data: [u8; 8],
pub dlc: u8,
pub rtr: bool,
pub id: CanId,
}Expand description
A struct to contain a CanMessage
Fields§
§data: [u8; 8]The data payload of the message
Note, some bytes may be unused. Check dlc.
dlc: u8The length of the data payload
rtr: boolIndicates this message is a remote transmission request
id: CanIdThe id of this message
Implementations§
Source§impl CanMessage
impl CanMessage
Trait Implementations§
Source§impl Clone for CanMessage
impl Clone for CanMessage
Source§fn clone(&self) -> CanMessage
fn clone(&self) -> CanMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanMessage
impl Debug for CanMessage
Source§impl Default for CanMessage
impl Default for CanMessage
Source§impl From<CanMessage> for SyncObject
impl From<CanMessage> for SyncObject
Source§fn from(msg: CanMessage) -> Self
fn from(msg: CanMessage) -> Self
Converts to this type from the input type.
Source§impl From<Heartbeat> for CanMessage
impl From<Heartbeat> for CanMessage
Source§impl From<LssRequest> for CanMessage
impl From<LssRequest> for CanMessage
Source§fn from(value: LssRequest) -> Self
fn from(value: LssRequest) -> Self
Converts to this type from the input type.
Source§impl From<NmtCommand> for CanMessage
impl From<NmtCommand> for CanMessage
Source§fn from(cmd: NmtCommand) -> Self
fn from(cmd: NmtCommand) -> Self
Converts to this type from the input type.
Source§impl From<SyncObject> for CanMessage
impl From<SyncObject> for CanMessage
Source§fn from(value: SyncObject) -> Self
fn from(value: SyncObject) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CanMessage
impl PartialEq for CanMessage
Source§impl TryFrom<CanMessage> for LssResponse
impl TryFrom<CanMessage> for LssResponse
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
Source§impl TryFrom<CanMessage> for NmtCommand
impl TryFrom<CanMessage> for NmtCommand
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
Source§impl TryFrom<CanMessage> for SdoResponse
impl TryFrom<CanMessage> for SdoResponse
Source§impl TryFrom<CanMessage> for ZencanMessage
impl TryFrom<CanMessage> for ZencanMessage
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
impl Copy for CanMessage
impl Eq for CanMessage
impl StructuralPartialEq for CanMessage
Auto Trait Implementations§
impl Freeze for CanMessage
impl RefUnwindSafe for CanMessage
impl Send for CanMessage
impl Sync for CanMessage
impl Unpin for CanMessage
impl UnwindSafe for CanMessage
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more