pub enum SampleKind {
U8,
U16,
F32,
}Expand description
The numeric type of one channel sample.
Deliberately exhaustive, unlike most enums here: kernels match on it to
select a monomorphization, so downstream op crates must be able to match it
without a wildcard arm — see dispatch_sample!. A wildcard would silently
swallow a new sample type at runtime; an exhaustive match turns adding one
into the compile error it deserves to be.
Variants§
U8
8-bit unsigned integer, full range 0..=255.
U16
16-bit unsigned integer, native endian in memory, full range 0..=65535.
F32
32-bit IEEE-754 float, nominal range 0.0..=1.0 (used for filter math).
Implementations§
Trait Implementations§
Source§impl Clone for SampleKind
impl Clone for SampleKind
Source§fn clone(&self) -> SampleKind
fn clone(&self) -> SampleKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SampleKind
Source§impl Debug for SampleKind
impl Debug for SampleKind
impl Eq for SampleKind
Source§impl Hash for SampleKind
impl Hash for SampleKind
Source§impl PartialEq for SampleKind
impl PartialEq for SampleKind
impl StructuralPartialEq for SampleKind
Auto Trait Implementations§
impl Freeze for SampleKind
impl RefUnwindSafe for SampleKind
impl Send for SampleKind
impl Sync for SampleKind
impl Unpin for SampleKind
impl UnsafeUnpin for SampleKind
impl UnwindSafe for SampleKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more