SampleType

Enum SampleType 

Source
pub enum SampleType {
    U8,
    U16,
    U32,
    U64,
    I8,
    I16,
    I32,
    I64,
    F32,
    F64,
}
Expand description

The underlying data type of the samples

Variants§

§

U8

Samples using the u8 type

§

U16

Samples using the u16 type

§

U32

Samples using the u32 type

§

U64

Samples using the u64 type

§

I8

Samples using the i8 type

§

I16

Samples using the i16 type

§

I32

Samples using the i32 type

§

I64

Samples using the i64 type

§

F32

Samples using the f32 type

§

F64

Samples using the f64 type

Trait Implementations§

Source§

impl Clone for SampleType

Source§

fn clone(&self) -> SampleType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SampleType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Samples<f32>> for SampleType

Source§

fn from(_value: &Samples<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<f64>> for SampleType

Source§

fn from(_value: &Samples<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<i16>> for SampleType

Source§

fn from(_value: &Samples<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<i32>> for SampleType

Source§

fn from(_value: &Samples<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<i64>> for SampleType

Source§

fn from(_value: &Samples<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<i8>> for SampleType

Source§

fn from(_value: &Samples<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<u16>> for SampleType

Source§

fn from(_value: &Samples<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<u32>> for SampleType

Source§

fn from(_value: &Samples<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<u64>> for SampleType

Source§

fn from(_value: &Samples<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<&Samples<u8>> for SampleType

Source§

fn from(_value: &Samples<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<SampleType> for SampleFormat

Source§

fn from(value: SampleType) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for SampleType

Source§

fn from(_value: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for SampleType

Source§

fn from(_value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for SampleType

Source§

fn from(_value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for SampleType

Source§

fn from(_value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for SampleType

Source§

fn from(_value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for SampleType

Source§

fn from(_value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for SampleType

Source§

fn from(_value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for SampleType

Source§

fn from(_value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for SampleType

Source§

fn from(_value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for SampleType

Source§

fn from(_value: u8) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SampleType

Source§

fn eq(&self, other: &SampleType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SampleType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,