Struct pod::endian::EndianPrimitive
[−]
[src]
pub struct EndianPrimitive<B, T> { // some fields omitted }
A POD container for a primitive that stores a value in the specified endianness
in memory, and transforms on get
/set
Methods
impl<B: ByteOrder, T: EndianConvert> EndianPrimitive<B, T>
[src]
fn new(v: T) -> Self
Creates a new value
fn get(&self) -> T
Transforms to the native value
fn set(&mut self, v: T)
Transforms from a native value
Trait Implementations
impl<B, T: Pod> Pod for EndianPrimitive<B, T>
[src]
impl<B, T: PodType> PodType for EndianPrimitive<B, T>
[src]
impl<B: ByteOrder, T: Default + EndianConvert> Default for EndianPrimitive<B, T>
[src]
impl<B: ByteOrder, T: EndianConvert> From<T> for EndianPrimitive<B, T>
[src]
fn from(v: T) -> Self
Performs the conversion.
impl<B, T: Debug> Debug for EndianPrimitive<B, T>
[src]
impl<BRHS: ByteOrder, RHS: EndianConvert, B: ByteOrder, T: EndianConvert + PartialEq<RHS>> PartialEq<EndianPrimitive<BRHS, RHS>> for EndianPrimitive<B, T>
[src]
fn eq(&self, other: &EndianPrimitive<BRHS, RHS>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<B, T: Hash> Hash for EndianPrimitive<B, T>
[src]
fn hash<H: Hasher>(&self, h: &mut H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<B, T: Clone> Clone for EndianPrimitive<B, T>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more