#[non_exhaustive]pub enum SampleType {
U8,
I8,
U16,
I16,
F16,
U32,
I32,
F32,
U64,
I64,
F64,
}Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Native numeric type of each stored channel sample.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
U8
Unsigned 8-bit integer (0..=255).
I8
Signed 8-bit integer (-128..=127).
U16
Unsigned 16-bit integer (0..=65535).
I16
Signed 16-bit integer (-32768..=32767).
F16
IEEE 754 binary16 half-precision float (F16Sample).
U32
Unsigned 32-bit integer.
I32
Signed 32-bit integer.
F32
IEEE 754 binary32 single-precision float (f32).
U64
Unsigned 64-bit integer.
I64
Signed 64-bit integer.
F64
IEEE 754 binary64 double-precision float (f64).
Implementations§
Source§impl SampleType
impl SampleType
Sourcepub const fn min_alignment(self) -> usize
pub const fn min_alignment(self) -> usize
Required byte alignment for a slice of samples of this type on this target.
Sourcepub const fn is_float(self) -> bool
pub const fn is_float(self) -> bool
Whether this sample type is IEEE floating point (F16, F32, or F64).
Sourcepub const fn is_integer(self) -> bool
pub const fn is_integer(self) -> bool
Whether this sample type is an integer type (signed or unsigned).
Sourcepub const fn is_signed(self) -> bool
pub const fn is_signed(self) -> bool
Whether this sample type is signed (integers I* or floats F*).
Sourcepub const fn is_standard_color(self) -> bool
pub const fn is_standard_color(self) -> bool
Whether this sample type is one of the 4 standard processing types (U8, U16, F16, F32).
Trait Implementations§
Source§impl Clone for SampleType
impl Clone for SampleType
Source§fn clone(&self) -> SampleType
fn clone(&self) -> SampleType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more