Enum image_canvas::layout::SampleBits
source · [−]#[non_exhaustive]
#[repr(u8)]
pub enum SampleBits {
Show 38 variants
Int8,
UInt8,
UInt1x8,
UInt2x4,
UInt332,
UInt233,
Int16,
UInt16,
UInt4x2,
UInt4x4,
UInt4x6,
UInt_444,
UInt444_,
UInt565,
UInt8x2,
UInt8x3,
UInt8x4,
UInt8x6,
Int8x2,
Int8x3,
Int8x4,
UInt16x2,
UInt16x3,
UInt16x4,
Int16x2,
Int16x3,
Int16x4,
UInt16x6,
UInt1010102,
UInt2101010,
UInt101010_,
UInt_101010,
Float16x4,
Float32,
Float32x2,
Float32x3,
Float32x4,
Float32x6,
}
Expand description
The bit-placement of samples within a texel.
We start with low-order bits in a little-endian representation of the surrounding numbers. So, for example, Int332 has the first sample in the three lowest bits of a u8 (byte-order independent) and a Int565 has its first channel in the first 5 low-order bits of a u16 little endian interpretation of the bytes.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Int8
A single 8-bit signed integer.
UInt8
A single 8-bit integer.
UInt1x8
Eight 1-bit integer.
UInt2x4
Four 2-bit integer.
UInt332
Three packed integer.
UInt233
Three packed integer.
Int16
A single 8-bit signed integer.
UInt16
A single 16-bit integer.
UInt4x2
Two packed integer.
UInt4x4
Four packed integer.
UInt4x6
Six packed integer.
UInt_444
Four packed integer, one component ignored.
UInt444_
Four packed integer, one component ignored.
UInt565
Three packed integer.
UInt8x2
Two 8-bit integers.
UInt8x3
Three 8-bit integer.
UInt8x4
Four 8-bit integer.
UInt8x6
Six 8-bit integer.
Int8x2
Two 8-bit integers.
Int8x3
Three 8-bit integer.
Int8x4
Four 8-bit integer.
UInt16x2
Two 16-bit integers.
UInt16x3
Three 16-bit integer.
UInt16x4
Four 16-bit integer.
Int16x2
Two 16-bit signed integers.
Int16x3
Three 16-bit integer.
Int16x4
Four 16-bit integer.
UInt16x6
Six 16-bit integer.
UInt1010102
Four packed integer.
UInt2101010
Four packed integer.
UInt101010_
Three packed integer, one component ignored.
UInt_101010
Three packed integer, one component ignored.
Float16x4
Four half-floats.
Float32
A single floating-point channel.
Float32x2
Two float channels.
Float32x3
Three float channels.
Float32x4
Four floats.
Float32x6
Six floats.
Implementations
sourceimpl SampleBits
impl SampleBits
Trait Implementations
sourceimpl Clone for SampleBits
impl Clone for SampleBits
sourcefn clone(&self) -> SampleBits
fn clone(&self) -> SampleBits
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SampleBits
impl Debug for SampleBits
sourceimpl PartialEq<SampleBits> for SampleBits
impl PartialEq<SampleBits> for SampleBits
impl Copy for SampleBits
impl Eq for SampleBits
impl StructuralEq for SampleBits
impl StructuralPartialEq for SampleBits
Auto Trait Implementations
impl RefUnwindSafe for SampleBits
impl Send for SampleBits
impl Sync for SampleBits
impl Unpin for SampleBits
impl UnwindSafe for SampleBits
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more