Enum bytes_parser::ParsingEndian
source · pub enum ParsingEndian {
BE,
LE,
}
Expand description
Control which endian system to use when parsing raw bytes.
This is crucial when parsing scalar values from byte-representation, as it determines the order in which bytes are read and interpreted to reconstruct the original scalar value.
More details about Endianness can be found here.
Variants§
BE
Read using the big-endian (BE) byte order system (default).
A big-endian system stores the most significant byte of a word at the smallest memory address and the least significant byte at the largest.
NOTE: This is the default endian for this crate.
LE
Read using the little-endian (LE) byte order system.
A little-endian system stores the least significant byte of a word at the smallest memory address, and the most significant byte at the largest.
Trait Implementations§
source§impl Clone for ParsingEndian
impl Clone for ParsingEndian
source§fn clone(&self) -> ParsingEndian
fn clone(&self) -> ParsingEndian
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ParsingEndian
impl Debug for ParsingEndian
source§impl Default for ParsingEndian
impl Default for ParsingEndian
source§fn default() -> Self
fn default() -> Self
Default value for ParsingEndian is ParsingEndian::BE.
source§impl PartialEq<ParsingEndian> for ParsingEndian
impl PartialEq<ParsingEndian> for ParsingEndian
source§fn eq(&self, other: &ParsingEndian) -> bool
fn eq(&self, other: &ParsingEndian) -> bool
self
and other
values to be equal, and is used
by ==
.