Struct byteorder_pod::EndianPrimitive [] [src]

#[repr(C)]
pub struct EndianPrimitive<B, T: EndianConvert, Alignment = ()> { /* fields omitted */ }

A POD container for a primitive that stores a value in the specified endianness in memory, and transforms on get/set

Methods

impl<B: ByteOrder, T: EndianConvert, A> EndianPrimitive<B, T, A>
[src]

Creates a new value

Transforms to the native value

Transforms from a native value

Gets the inner untransformed value

A mutable reference to the inner untransformed value

Trait Implementations

impl<B: Pod, T: EndianConvert, A> Pod for EndianPrimitive<B, T, A>
[src]

Generates a new uninitialized instance of a POD type.

Creates a new zeroed instance of a POD type.

Creates a copy of this POD instance

Converts a POD reference from one to another type of the same size. Read more

Converts a mutable POD reference from one to another type of the same size. Read more

Converts a POD type from one to another of the same size. Read more

Converts a POD reference from one to another type of the same or lesser size. Read more

Converts a mutable POD reference from one to another type of the same or lesser size. Read more

Converts a POD type from one to another of the same or lesser size. Read more

Converts a boxed POD type from one to another of the same size. Read more

Converts a POD reference into a slice of another type. Read more

Converts a mutable POD reference into a slice of another type. Read more

Converts a POD reference into a slice of another type. Read more

Converts a mutable POD reference into a slice of another type. Read more

Converts a boxed POD object into a boxed slice of another type. Read more

Converts a boxed POD object into a vector of another type. Read more

Maps a POD slice from one type to another. Read more

Maps a mutable POD slice from one type to another. Read more

Maps a POD slice from one type to another. Read more

Maps a mutable POD slice from one type to another. Read more

Maps a boxed POD slice from one type to another. Read more

Maps a POD vector from one type to another. Read more

Converts a POD slice into another type. Read more

Converts a mutable POD slice into another type. Read more

Converts a POD slice into another type. Read more

Converts a POD slice into another type. Read more

Converts a mutable POD slice into another type. Read more

Converts a POD slice into another type. Read more

Converts a boxed POD slice into another boxed type. Read more

Converts a POD vector into another boxed type. Read more

Creates a new POD instance from an unaligned pointer. Read more

Creates a new POD instance with the inverse of map_copy()

Creates a new POD instance with the inverse of merge_copy()

Creates a new POD instance with the inverse of merge_box()

Creates a new POD instance with the inverse of merge_vec()

Creates a new POD instance with the inverse of map_slice_box()

Creates a POD reference with the inverse of map()

Creates a mutable POD reference with the inverse of map_mut()

Creates a POD reference with the inverse of merge()

Creates a mutable POD reference with the inverse of merge_mut()

Borrows the POD as a byte slice

Borrows the POD as a mutable byte slice

Safely creates a POD value from a potentially unaligned slice Read more

Borrows a new instance of the POD from a byte slice Read more

Borrows a mutable instance of the POD from a mutable byte slice Read more

Converts a boxed slice to a boxed instance of the POD type Read more

Converts a byte vector to a boxed instance of the POD type Read more

Converts a boxed POD to a boxed slice

Converts a boxed POD to a byte vector

Safely borrows the aligned value mutably Read more

Safely borrows the unaligned value mutably Read more

Safely converts an unaligned value to its aligned equivalent Read more

impl<B, T: EndianConvert, A: Unaligned> Unaligned for EndianPrimitive<B, T, A>
[src]

impl<B, T: EndianConvert, A: Unaligned> Packed for EndianPrimitive<B, T, A>
[src]

impl<B: ByteOrder, T: Default + EndianConvert, A> Default for EndianPrimitive<B, T, A>
[src]

Returns the "default value" for a type. Read more

impl<B: ByteOrder, T: EndianConvert, A> From<T> for EndianPrimitive<B, T, A>
[src]

Performs the conversion.

impl<B: ByteOrder, T: Debug + EndianConvert, A> Debug for EndianPrimitive<B, T, A>
[src]

Formats the value using the given formatter.

impl<ARHS, A, BRHS: ByteOrder, RHS: EndianConvert, B: ByteOrder, T: EndianConvert + PartialEq<RHS>> PartialEq<EndianPrimitive<BRHS, RHS, ARHS>> for EndianPrimitive<B, T, A>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<A, B: ByteOrder, T: EndianConvert + Eq> Eq for EndianPrimitive<B, T, A>
[src]

impl<ARHS, A, BRHS: ByteOrder, RHS: EndianConvert, B: ByteOrder, T: EndianConvert + PartialOrd<RHS>> PartialOrd<EndianPrimitive<BRHS, RHS, ARHS>> for EndianPrimitive<B, T, A>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<B: ByteOrder, T: EndianConvert + Ord, A> Ord for EndianPrimitive<B, T, A>
[src]

This method returns an Ordering between self and other. Read more

impl<B, T: EndianConvert + Hash, A> Hash for EndianPrimitive<B, T, A> where
    T::Unaligned: Hash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<B, T: EndianConvert, A> Clone for EndianPrimitive<B, T, A>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<B, T: EndianConvert, A: Copy> Copy for EndianPrimitive<B, T, A>
[src]

impl<B: ByteOrder, A> Into<u16> for EndianPrimitive<B, u16, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<i16> for EndianPrimitive<B, i16, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<i32> for EndianPrimitive<B, i32, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<u32> for EndianPrimitive<B, u32, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<i64> for EndianPrimitive<B, i64, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<u64> for EndianPrimitive<B, u64, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<f32> for EndianPrimitive<B, f32, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<f64> for EndianPrimitive<B, f64, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<usize> for EndianPrimitive<B, usize, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<isize> for EndianPrimitive<B, isize, A>
[src]

Performs the conversion.

impl<T, B: ByteOrder, A> Into<*const T> for EndianPrimitive<B, *const T, A>
[src]

Performs the conversion.

impl<T, B: ByteOrder, A> Into<*mut T> for EndianPrimitive<B, *mut T, A>
[src]

Performs the conversion.

impl<B: ByteOrder, A> Into<bool> for EndianPrimitive<B, bool, A>
[src]

Performs the conversion.