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