pub enum ByteOrder {
BigEndian,
LittleEndian,
MidBigEndian,
MidLittleEndian,
}Expand description
How a multi-register Modbus value is laid out in memory.
Variants describe both endianness and word order — Modbus does not fix this, every vendor does it differently.
Variants§
BigEndian
Big-endian, big-word-first (AB CD). Most common.
LittleEndian
Little-endian, little-word-first (DC BA).
MidBigEndian
Mid-big — bytes big-endian, words swapped (CD AB).
MidLittleEndian
Mid-little — bytes little-endian, words swapped (BA DC).
Trait Implementations§
impl Copy for ByteOrder
Source§impl<'de> Deserialize<'de> for ByteOrder
impl<'de> Deserialize<'de> for ByteOrder
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>,
Deserialize this value from the given Serde deserializer. Read more
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