pub trait RawData:
Sized
+ Sealed
+ RawDataIterNext<LittleEndian>
+ RawDataIterNext<BigEndian>
+ From<Self::Storage> {
type Storage;
const BITS_PER_PIXEL: usize;
// Required methods
fn into_inner(self) -> Self::Storage;
fn from_u32(value: u32) -> Self;
}
Expand description
Trait implemented by all RawUx
types.
Required Associated Constants§
Sourceconst BITS_PER_PIXEL: usize
const BITS_PER_PIXEL: usize
Bits per pixel.
Required Associated Types§
Required Methods§
Sourcefn into_inner(self) -> Self::Storage
fn into_inner(self) -> Self::Storage
Converts this raw data into the storage type.
If the primitive integer types used as the storage type contains more bits
than used by this type the unused most significant bits are set to 0
.
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.
Implementations on Foreign Types§
Source§impl RawData for ()
impl RawData for ()
Dummy implementation for ()
.
()
can be used as PixelColor::Raw
if raw data conversion isn’t required.