#[non_exhaustive]pub enum SampleFormat {
U8,
S8,
S16,
S32,
F32,
F64,
}Expand description
An audio sample format from the §24.3 AudioFrame[sample=…] table.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
U8
Unsigned 8-bit PCM.
S8
Signed 8-bit PCM.
S16
Signed 16-bit PCM.
S32
Signed 32-bit PCM.
F32
32-bit float PCM.
F64
64-bit float PCM.
Implementations§
Source§impl SampleFormat
impl SampleFormat
Sourcepub const fn sample_type(self) -> DataType
pub const fn sample_type(self) -> DataType
The columnar type one sample occupies.
Trait Implementations§
Source§impl Clone for SampleFormat
impl Clone for SampleFormat
impl Copy for SampleFormat
Source§impl Debug for SampleFormat
impl Debug for SampleFormat
Source§impl Display for SampleFormat
impl Display for SampleFormat
impl Eq for SampleFormat
Source§impl Hash for SampleFormat
impl Hash for SampleFormat
Source§impl Ord for SampleFormat
impl Ord for SampleFormat
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SampleFormat
impl PartialEq for SampleFormat
Source§impl PartialOrd for SampleFormat
impl PartialOrd for SampleFormat
impl StructuralPartialEq for SampleFormat
Auto Trait Implementations§
impl Freeze for SampleFormat
impl RefUnwindSafe for SampleFormat
impl Send for SampleFormat
impl Sync for SampleFormat
impl Unpin for SampleFormat
impl UnsafeUnpin for SampleFormat
impl UnwindSafe for SampleFormat
Blanket Implementations§
impl<T> Allocation for T
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