Struct packed_struct::types::MsbInteger [−][src]
pub struct MsbInteger<T, B, I>(_, _, _);
A wrapper that packages the integer as a MSB packaged byte array. Usually invoked using code generation.
Trait Implementations
impl<T, B, I> Deref for MsbInteger<T, B, I>
[src]
impl<T, B, I> Deref for MsbInteger<T, B, I>
type Target = I
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Rfn deref(&self) -> &I
[src]
ⓘImportant traits for &'a mut R
fn deref(&self) -> &I
Dereferences the value.
impl<T, B, I> From<I> for MsbInteger<T, B, I>
[src]
impl<T, B, I> From<I> for MsbInteger<T, B, I>
impl<T, B, I> Debug for MsbInteger<T, B, I> where
I: Debug,
[src]
impl<T, B, I> Debug for MsbInteger<T, B, I> where
I: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T, B, I> Display for MsbInteger<T, B, I> where
I: Display,
[src]
impl<T, B, I> Display for MsbInteger<T, B, I> where
I: Display,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T, B, I> PackedStruct<<<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes> for MsbInteger<T, B, I> where
B: NumberOfBits,
I: SizedInteger<T, B>,
[src]
impl<T, B, I> PackedStruct<<<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes> for MsbInteger<T, B, I> where
B: NumberOfBits,
I: SizedInteger<T, B>,
fn pack(&self) -> <<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes
[src]
fn pack(&self) -> <<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes
Packs the structure into a byte array.
fn unpack(
src: &<<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes
) -> Result<Self, PackingError>
[src]
fn unpack(
src: &<<B as NumberOfBits>::Bytes as NumberOfBytes>::AsBytes
) -> Result<Self, PackingError>
Unpacks the structure from a byte array.
impl<T, B, I> PackedStructInfo for MsbInteger<T, B, I> where
B: NumberOfBits,
[src]
impl<T, B, I> PackedStructInfo for MsbInteger<T, B, I> where
B: NumberOfBits,
fn packed_bits() -> usize
[src]
fn packed_bits() -> usize
Number of bits that this structure occupies when being packed.
impl<T, B, I> PackedStructSlice for MsbInteger<T, B, I> where
B: NumberOfBits,
I: SizedInteger<T, B>,
[src]
impl<T, B, I> PackedStructSlice for MsbInteger<T, B, I> where
B: NumberOfBits,
I: SizedInteger<T, B>,
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
[src]
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
Pack the structure into an output buffer.
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
[src]
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
Unpack the structure from a buffer.
fn packed_bytes() -> usize
[src]
fn packed_bytes() -> usize
Number of bytes that this structure demands for packing or unpacking.
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
[src]
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
Pack the structure into a new byte vector.
Auto Trait Implementations
impl<T, B, I> Send for MsbInteger<T, B, I> where
B: Send,
I: Send,
T: Send,
impl<T, B, I> Send for MsbInteger<T, B, I> where
B: Send,
I: Send,
T: Send,
impl<T, B, I> Sync for MsbInteger<T, B, I> where
B: Sync,
I: Sync,
T: Sync,
impl<T, B, I> Sync for MsbInteger<T, B, I> where
B: Sync,
I: Sync,
T: Sync,