#[repr(C, packed(1))]pub struct RdxUsbPacket {
pub timestamp_ns: u64,
pub arb_id: u32,
pub dlc: u8,
pub channel: u8,
pub flags: u16,
pub data: [u8; 64],
}
Expand description
Generic data packet passed to/from RdxUsb APIs.
Fields§
§timestamp_ns: u64
Timestamp since boot (nanoseconds)
arb_id: u32
CAN arbitration id.
dlc: u8
Data length code.
channel: u8
Relevant channel. Zero most of the time.
flags: u16
Misc flags (unused for now)
data: [u8; 64]
data (max size: 64 bytes)
Implementations§
Trait Implementations§
Source§impl Clone for RdxUsbPacket
impl Clone for RdxUsbPacket
Source§fn clone(&self) -> RdxUsbPacket
fn clone(&self) -> RdxUsbPacket
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 RdxUsbPacket
impl Debug for RdxUsbPacket
Source§impl From<RdxUsbFsPacket> for RdxUsbPacket
impl From<RdxUsbFsPacket> for RdxUsbPacket
Source§fn from(value: RdxUsbFsPacket) -> Self
fn from(value: RdxUsbFsPacket) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RdxUsbPacket
impl PartialEq for RdxUsbPacket
Source§impl TryFrom<RdxUsbPacket> for RdxUsbFsPacket
impl TryFrom<RdxUsbPacket> for RdxUsbFsPacket
Source§type Error = RdxUsbPacket
type Error = RdxUsbPacket
The type returned in the event of a conversion error.
impl Copy for RdxUsbPacket
impl Eq for RdxUsbPacket
impl Pod for RdxUsbPacket
impl StructuralPartialEq for RdxUsbPacket
Auto Trait Implementations§
impl Freeze for RdxUsbPacket
impl RefUnwindSafe for RdxUsbPacket
impl Send for RdxUsbPacket
impl Sync for RdxUsbPacket
impl Unpin for RdxUsbPacket
impl UnwindSafe for RdxUsbPacket
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.