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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Default value for ParsingEndian is ParsingEndian::BE.

This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.