Endian

Trait Endian 

Source
pub trait Endian:
    Copy
    + Default
    + Debug
    + PartialEq
    + PartialOrd
    + Sized
    + Send
    + Sync
    + Unpin {
    // Required methods
    unsafe fn __write_at__(self, dst: *mut u8);
    unsafe fn __read_at__(src: *const u8) -> Self;
}
Expand description

This trait contains unsafe methods for efficiently reading and writing data.

Those Methods are unsafe because they do not check the index bounds.

And safely used by internal. And shouldn’t expect to be used by user.

Required Methods§

Source

unsafe fn __write_at__(self, dst: *mut u8)

Source

unsafe fn __read_at__(src: *const u8) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Endian for f32

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for f64

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for i8

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for i16

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for i32

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for i64

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for i128

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for isize

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for u8

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for u16

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for u32

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for u64

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for u128

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Source§

impl Endian for usize

Source§

unsafe fn __write_at__(self, dst: *mut u8)

Source§

unsafe fn __read_at__(src: *const u8) -> Self

Implementors§