pub struct NumRepr {
pub endianness: Endianness,
pub num_encoding: NumEncoding,
}Expand description
Controls the binary representation of numbers (different from sizes and enum variants).
Specifically, controls the Endianness and NumEncoding.
Fields§
§endianness: Endianness§num_encoding: NumEncodingImplementations§
Source§impl NumRepr
impl NumRepr
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Returns the default numerical representation: little endian with fixed encoding
Sourcepub const fn endianness(self, endiannes: Endianness) -> Self
pub const fn endianness(self, endiannes: Endianness) -> Self
Sets the endianness, then returns self.
Sourcepub const fn num_encoding(self, num_encoding: NumEncoding) -> Self
pub const fn num_encoding(self, num_encoding: NumEncoding) -> Self
Sets the numerical encoding, then returns self.
Trait Implementations§
impl Copy for NumRepr
impl Eq for NumRepr
impl StructuralPartialEq for NumRepr
Auto Trait Implementations§
impl Freeze for NumRepr
impl RefUnwindSafe for NumRepr
impl Send for NumRepr
impl Sync for NumRepr
impl Unpin for NumRepr
impl UnwindSafe for NumRepr
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