Struct I32Bytes

struct I32Bytes<E: Endian>(_, _)

An unaligned i32 value with an externally specified endianness of type E.

Implementations

impl<E: Endian> I32Bytes<E>

const fn from_bytes(n: [u8; 4]) -> Self

Construct a new value given bytes that already have the required endianness.

fn new(e: E, n: i32) -> Self

Construct a new value given a native endian value.

fn get(self: Self, e: E) -> i32

Return the value as a native endian value.

fn set(self: &mut Self, e: E, n: i32)

Set the value given a native endian value.

impl<E> Freeze for I32Bytes<E>

impl<E> RefUnwindSafe for I32Bytes<E>

impl<E> Send for I32Bytes<E>

impl<E> Sync for I32Bytes<E>

impl<E> Unpin for I32Bytes<E>

impl<E> UnwindSafe for I32Bytes<E>

impl<E: $crate::clone::Clone + Endian> Clone for I32Bytes<E>

fn clone(self: &Self) -> I32Bytes<E>

impl<E: $crate::cmp::Eq + Endian> Eq for I32Bytes<E>

impl<E: $crate::cmp::Ord + Endian> Ord for I32Bytes<E>

fn cmp(self: &Self, other: &I32Bytes<E>) -> $crate::cmp::Ordering

impl<E: $crate::cmp::PartialEq + Endian> PartialEq for I32Bytes<E>

fn eq(self: &Self, other: &I32Bytes<E>) -> bool

impl<E: $crate::cmp::PartialOrd + Endian> PartialOrd for I32Bytes<E>

fn partial_cmp(self: &Self, other: &I32Bytes<E>) -> $crate::option::Option<$crate::cmp::Ordering>

impl<E: $crate::default::Default + Endian> Default for I32Bytes<E>

fn default() -> I32Bytes<E>

impl<E: $crate::hash::Hash + Endian> Hash for I32Bytes<E>

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl<E: $crate::marker::Copy + Endian> Copy for I32Bytes<E>

impl<E: Endian> Debug for I32Bytes<E>

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl<E: Endian> Pod for I32Bytes<E>

impl<E: Endian> StructuralPartialEq for I32Bytes<E>

impl<T> Any for I32Bytes<E>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for I32Bytes<E>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for I32Bytes<E>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for I32Bytes<E>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for I32Bytes<E>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for I32Bytes<E>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for I32Bytes<E>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for I32Bytes<E>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for I32Bytes<E>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>