pub enum ByteOrder {
Intel,
Motorola,
}Expand description
The two byte orders a slave may advertise, per XCP part 1, §CONNECT
(COMM_MODE_BASIC bit 0).
Variants§
Intel
Intel / little-endian: least significant byte first (0x00800000
→ 00 00 80 00). The common case on CAN-attached ECUs; the crate’s
default where a builder is offered without an explicit order.
Motorola
Motorola / big-endian: most significant byte first (0x00800000 →
00 80 00 00).
Implementations§
Source§impl ByteOrder
impl ByteOrder
Sourcepub const fn from_bit(bit: u8) -> Self
pub const fn from_bit(bit: u8) -> Self
Decode from the COMM_MODE_BASIC bit 0 value (0 = Intel, 1 =
Motorola).
Sourcepub const fn to_bit(self) -> u8
pub const fn to_bit(self) -> u8
Encode to the COMM_MODE_BASIC bit 0 value (0 = Intel, 1 =
Motorola).
Trait Implementations§
impl Copy for ByteOrder
impl Eq for ByteOrder
impl StructuralPartialEq for ByteOrder
Auto Trait Implementations§
impl Freeze for ByteOrder
impl RefUnwindSafe for ByteOrder
impl Send for ByteOrder
impl Sync for ByteOrder
impl Unpin for ByteOrder
impl UnsafeUnpin for ByteOrder
impl UnwindSafe for ByteOrder
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