pub trait Unpackable:
Copy
+ Sized
+ Default {
type Packed: Packed;
type Unpacked: Unpacked<Self>;
// Required methods
fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked);
fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8]);
}
Expand description
A type representing a type that can be bitpacked and unpacked by this crate.
Required Associated Types§
Required Methods§
fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)
fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8])
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.