pub enum BigEndian {}
Expand description
Defines big-endian serialization.
Note that this type has no value constructor. It is used purely at the type level.
Trait Implementations
sourceimpl ByteOrder for BigEndian
impl ByteOrder for BigEndian
sourcefn read_uint(buf: &[u8], nbytes: usize) -> u64
fn read_uint(buf: &[u8], nbytes: usize) -> u64
Reads an unsigned n-bytes integer from buf
. Read more
sourcefn write_uint(buf: &mut [u8], n: u64, nbytes: usize)
fn write_uint(buf: &mut [u8], n: u64, nbytes: usize)
Writes an unsigned integer n
to buf
using only nbytes
. Read more
sourcefn read_int(buf: &[u8], nbytes: usize) -> i64
fn read_int(buf: &[u8], nbytes: usize) -> i64
Reads a signed n-bytes integer from buf
. Read more
sourcefn read_f32(buf: &[u8]) -> f32
fn read_f32(buf: &[u8]) -> f32
Reads a IEEE754 single-precision (4 bytes) floating point number. Read more
sourcefn read_f64(buf: &[u8]) -> f64
fn read_f64(buf: &[u8]) -> f64
Reads a IEEE754 double-precision (8 bytes) floating point number. Read more
sourcefn write_int(buf: &mut [u8], n: i64, nbytes: usize)
fn write_int(buf: &mut [u8], n: i64, nbytes: usize)
Writes a signed integer n
to buf
using only nbytes
. Read more
Auto Trait Implementations
impl RefUnwindSafe for BigEndian
impl Send for BigEndian
impl Sync for BigEndian
impl Unpin for BigEndian
impl UnwindSafe for BigEndian
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more