pub trait ByteOrder: Clone + Copy {
Show 20 methods
// Required methods
fn read_u16(buf: &[u8]) -> u16;
fn read_u32(buf: &[u8]) -> u32;
fn read_u64(buf: &[u8]) -> u64;
fn write_u16(buf: &mut [u8], n: u16);
fn write_u32(buf: &mut [u8], n: u32);
fn write_u64(buf: &mut [u8], n: u64);
fn read_u128(buf: &[u8]) -> u128;
fn write_u128(buf: &mut [u8], n: u128);
// Provided methods
fn read_i16(buf: &[u8]) -> i16 { ... }
fn read_i32(buf: &[u8]) -> i32 { ... }
fn read_i64(buf: &[u8]) -> i64 { ... }
fn read_f32(buf: &[u8]) -> f32 { ... }
fn read_f64(buf: &[u8]) -> f64 { ... }
fn write_i16(buf: &mut [u8], n: i16) { ... }
fn write_i32(buf: &mut [u8], n: i32) { ... }
fn write_i64(buf: &mut [u8], n: i64) { ... }
fn write_f32(buf: &mut [u8], n: f32) { ... }
fn write_f64(buf: &mut [u8], n: f64) { ... }
fn read_i128(buf: &[u8]) -> i128 { ... }
fn write_i128(buf: &mut [u8], n: i128) { ... }
}
Required Methods§
fn read_u16(buf: &[u8]) -> u16
fn read_u32(buf: &[u8]) -> u32
fn read_u64(buf: &[u8]) -> u64
fn write_u16(buf: &mut [u8], n: u16)
fn write_u32(buf: &mut [u8], n: u32)
fn write_u64(buf: &mut [u8], n: u64)
fn read_u128(buf: &[u8]) -> u128
fn write_u128(buf: &mut [u8], n: u128)
Provided Methods§
fn read_i16(buf: &[u8]) -> i16
fn read_i32(buf: &[u8]) -> i32
fn read_i64(buf: &[u8]) -> i64
fn read_f32(buf: &[u8]) -> f32
fn read_f64(buf: &[u8]) -> f64
fn write_i16(buf: &mut [u8], n: i16)
fn write_i32(buf: &mut [u8], n: i32)
fn write_i64(buf: &mut [u8], n: i64)
fn write_f32(buf: &mut [u8], n: f32)
fn write_f64(buf: &mut [u8], n: f64)
fn read_i128(buf: &[u8]) -> i128
fn write_i128(buf: &mut [u8], n: i128)
Object Safety§
This trait is not object safe.