Struct byteordered::StaticEndianness
source · pub struct StaticEndianness<E>(_);
Expand description
A data type representing a byte order known in compile time.
Unlike byteorder::LittleEndian
and byteorder::BigEndian
,
this type can be constructed.
Trait Implementations§
source§impl<E: Clone> Clone for StaticEndianness<E>
impl<E: Clone> Clone for StaticEndianness<E>
source§fn clone(&self) -> StaticEndianness<E>
fn clone(&self) -> StaticEndianness<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E: Debug> Debug for StaticEndianness<E>
impl<E: Debug> Debug for StaticEndianness<E>
source§impl<E> Default for StaticEndianness<E>
impl<E> Default for StaticEndianness<E>
source§impl<E> Endian for StaticEndianness<E>where
E: ByteOrder,
impl<E> Endian for StaticEndianness<E>where
E: ByteOrder,
source§fn read_i16<S>(&self, src: S) -> IoResult<i16>where
S: Read,
fn read_i16<S>(&self, src: S) -> IoResult<i16>where
S: Read,
Reads a signed 16 bit integer from the given reader. Read more
source§fn read_u16<S>(&self, src: S) -> IoResult<u16>where
S: Read,
fn read_u16<S>(&self, src: S) -> IoResult<u16>where
S: Read,
Reads an unsigned 16 bit integer from the given reader. Read more
source§fn read_i32<S>(&self, src: S) -> IoResult<i32>where
S: Read,
fn read_i32<S>(&self, src: S) -> IoResult<i32>where
S: Read,
Reads a signed 32 bit integer from the given reader. Read more
source§fn read_u32<S>(&self, src: S) -> IoResult<u32>where
S: Read,
fn read_u32<S>(&self, src: S) -> IoResult<u32>where
S: Read,
Reads an unsigned 32 bit integer from the given reader. Read more
source§fn read_i64<S>(&self, src: S) -> IoResult<i64>where
S: Read,
fn read_i64<S>(&self, src: S) -> IoResult<i64>where
S: Read,
Reads a signed 64 bit integer from the given reader. Read more
source§fn read_u64<S>(&self, src: S) -> IoResult<u64>where
S: Read,
fn read_u64<S>(&self, src: S) -> IoResult<u64>where
S: Read,
Reads an unsigned 16 bit integer from the given reader. Read more
source§fn read_f32<S>(&self, src: S) -> IoResult<f32>where
S: Read,
fn read_f32<S>(&self, src: S) -> IoResult<f32>where
S: Read,
Reads a IEEE754 single-precision (4 bytes) floating point number from
the given reader. Read more
source§fn read_f64<S>(&self, src: S) -> IoResult<f64>where
S: Read,
fn read_f64<S>(&self, src: S) -> IoResult<f64>where
S: Read,
Reads a IEEE754 double-precision (8 bytes) floating point number from
the given reader. Read more
source§fn write_i16<W>(&self, src: W, x: i16) -> IoResult<()>where
W: Write,
fn write_i16<W>(&self, src: W, x: i16) -> IoResult<()>where
W: Write,
Writes a signed 16 bit integer to the given writer. Read more
source§fn write_u16<W>(&self, src: W, x: u16) -> IoResult<()>where
W: Write,
fn write_u16<W>(&self, src: W, x: u16) -> IoResult<()>where
W: Write,
Writes an unsigned 16 bit integer to the given writer. Read more
source§fn write_i32<W>(&self, src: W, x: i32) -> IoResult<()>where
W: Write,
fn write_i32<W>(&self, src: W, x: i32) -> IoResult<()>where
W: Write,
Writes a signed 32 bit integer to the given writer. Read more
source§fn write_u32<W>(&self, src: W, x: u32) -> IoResult<()>where
W: Write,
fn write_u32<W>(&self, src: W, x: u32) -> IoResult<()>where
W: Write,
Writes an unsigned 32 bit integer to the given writer. Read more
source§fn write_i64<W>(&self, src: W, x: i64) -> IoResult<()>where
W: Write,
fn write_i64<W>(&self, src: W, x: i64) -> IoResult<()>where
W: Write,
Writes a signed 64 bit integer to the given writer. Read more
source§fn write_u64<W>(&self, src: W, x: u64) -> IoResult<()>where
W: Write,
fn write_u64<W>(&self, src: W, x: u64) -> IoResult<()>where
W: Write,
Writes an unsigned 64 bit integer to the given writer. Read more
source§impl From<StaticEndianness<BigEndian>> for Endianness
impl From<StaticEndianness<BigEndian>> for Endianness
source§fn from(_: StaticEndianness<BigEndian>) -> Self
fn from(_: StaticEndianness<BigEndian>) -> Self
Converts to this type from the input type.
source§impl From<StaticEndianness<LittleEndian>> for Endianness
impl From<StaticEndianness<LittleEndian>> for Endianness
source§fn from(_: StaticEndianness<LittleEndian>) -> Self
fn from(_: StaticEndianness<LittleEndian>) -> Self
Converts to this type from the input type.
source§impl<E: Hash> Hash for StaticEndianness<E>
impl<E: Hash> Hash for StaticEndianness<E>
source§impl<E: Ord> Ord for StaticEndianness<E>
impl<E: Ord> Ord for StaticEndianness<E>
source§fn cmp(&self, other: &StaticEndianness<E>) -> Ordering
fn cmp(&self, other: &StaticEndianness<E>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<E: PartialEq> PartialEq<StaticEndianness<E>> for StaticEndianness<E>
impl<E: PartialEq> PartialEq<StaticEndianness<E>> for StaticEndianness<E>
source§fn eq(&self, other: &StaticEndianness<E>) -> bool
fn eq(&self, other: &StaticEndianness<E>) -> bool
source§impl<E: PartialOrd> PartialOrd<StaticEndianness<E>> for StaticEndianness<E>
impl<E: PartialOrd> PartialOrd<StaticEndianness<E>> for StaticEndianness<E>
source§fn partial_cmp(&self, other: &StaticEndianness<E>) -> Option<Ordering>
fn partial_cmp(&self, other: &StaticEndianness<E>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more