Enum byteorder::BigEndian [−][src]
pub enum BigEndian {}
Defines big-endian serialization.
Note that this type has no value constructor. It is used purely at the type level.
Examples
Write and read u32
numbers in big endian order:
use byteorder::{ByteOrder, BigEndian}; let mut buf = [0; 4]; BigEndian::write_u32(&mut buf, 1_000_000); assert_eq!(1_000_000, BigEndian::read_u32(&buf));
Trait Implementations
impl ByteOrder for BigEndian
[src]
impl ByteOrder for BigEndian
[src]fn read_u16(buf: &[u8]) -> u16
[src]
fn read_u32(buf: &[u8]) -> u32
[src]
fn read_u64(buf: &[u8]) -> u64
[src]
fn read_u128(buf: &[u8]) -> u128
[src]
fn read_uint(buf: &[u8], nbytes: usize) -> u64
[src]
fn read_uint128(buf: &[u8], nbytes: usize) -> u128
[src]
fn write_u16(buf: &mut [u8], n: u16)
[src]
fn write_u32(buf: &mut [u8], n: u32)
[src]
fn write_u64(buf: &mut [u8], n: u64)
[src]
fn write_u128(buf: &mut [u8], n: u128)
[src]
fn write_uint(buf: &mut [u8], n: u64, nbytes: usize)
[src]
fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize)
[src]
fn read_u16_into(src: &[u8], dst: &mut [u16])
[src]
fn read_u32_into(src: &[u8], dst: &mut [u32])
[src]
fn read_u64_into(src: &[u8], dst: &mut [u64])
[src]
fn read_u128_into(src: &[u8], dst: &mut [u128])
[src]
fn write_u16_into(src: &[u16], dst: &mut [u8])
[src]
fn write_u32_into(src: &[u32], dst: &mut [u8])
[src]
fn write_u64_into(src: &[u64], dst: &mut [u8])
[src]
fn write_u128_into(src: &[u128], dst: &mut [u8])
[src]
fn from_slice_u16(numbers: &mut [u16])
[src]
fn from_slice_u32(numbers: &mut [u32])
[src]
fn from_slice_u64(numbers: &mut [u64])
[src]
fn from_slice_u128(numbers: &mut [u128])
[src]
fn from_slice_f32(numbers: &mut [f32])
[src]
fn from_slice_f64(numbers: &mut [f64])
[src]
fn read_u24(buf: &[u8]) -> u32
[src]
fn read_u48(buf: &[u8]) -> u64
[src]
fn write_u24(buf: &mut [u8], n: u32)
[src]
fn write_u48(buf: &mut [u8], n: u64)
[src]
fn read_i16(buf: &[u8]) -> i16
[src]
fn read_i24(buf: &[u8]) -> i32
[src]
fn read_i32(buf: &[u8]) -> i32
[src]
fn read_i48(buf: &[u8]) -> i64
[src]
fn read_i64(buf: &[u8]) -> i64
[src]
fn read_i128(buf: &[u8]) -> i128
[src]
fn read_int(buf: &[u8], nbytes: usize) -> i64
[src]
fn read_int128(buf: &[u8], nbytes: usize) -> i128
[src]
fn read_f32(buf: &[u8]) -> f32
[src]
fn read_f64(buf: &[u8]) -> f64
[src]
fn write_i16(buf: &mut [u8], n: i16)
[src]
fn write_i24(buf: &mut [u8], n: i32)
[src]
fn write_i32(buf: &mut [u8], n: i32)
[src]
fn write_i48(buf: &mut [u8], n: i64)
[src]
fn write_i64(buf: &mut [u8], n: i64)
[src]
fn write_i128(buf: &mut [u8], n: i128)
[src]
fn write_int(buf: &mut [u8], n: i64, nbytes: usize)
[src]
fn write_int128(buf: &mut [u8], n: i128, nbytes: usize)
[src]
fn write_f32(buf: &mut [u8], n: f32)
[src]
fn write_f64(buf: &mut [u8], n: f64)
[src]
fn read_i16_into(src: &[u8], dst: &mut [i16])
[src]
fn read_i32_into(src: &[u8], dst: &mut [i32])
[src]
fn read_i64_into(src: &[u8], dst: &mut [i64])
[src]
fn read_i128_into(src: &[u8], dst: &mut [i128])
[src]
fn read_f32_into(src: &[u8], dst: &mut [f32])
[src]
fn read_f32_into_unchecked(src: &[u8], dst: &mut [f32])
[src]
fn read_f64_into(src: &[u8], dst: &mut [f64])
[src]
fn read_f64_into_unchecked(src: &[u8], dst: &mut [f64])
[src]
fn write_i8_into(src: &[i8], dst: &mut [u8])
[src]
fn write_i16_into(src: &[i16], dst: &mut [u8])
[src]
fn write_i32_into(src: &[i32], dst: &mut [u8])
[src]
fn write_i64_into(src: &[i64], dst: &mut [u8])
[src]
fn write_i128_into(src: &[i128], dst: &mut [u8])
[src]
fn write_f32_into(src: &[f32], dst: &mut [u8])
[src]
fn write_f64_into(src: &[f64], dst: &mut [u8])
[src]
fn from_slice_i16(src: &mut [i16])
[src]
fn from_slice_i32(src: &mut [i32])
[src]
fn from_slice_i64(src: &mut [i64])
[src]
fn from_slice_i128(src: &mut [i128])
[src]
impl PartialOrd<BigEndian> for BigEndian
[src]
impl PartialOrd<BigEndian> for BigEndian
[src]