Trait cpal::FromSample

source ·
pub trait FromSample<S> {
    // Required method
    fn from_sample_(s: S) -> Self;
}
Expand description

Similar to the std From trait, but specifically for converting between sample types.

We use this trait to be generic over the Sample::to_sample and Sample::from_sample methods.

Required Methods§

source

fn from_sample_(s: S) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromSample<f32> for f64

source§

impl FromSample<f32> for i8

source§

impl FromSample<f32> for i16

source§

impl FromSample<f32> for i32

source§

impl FromSample<f32> for i64

source§

impl FromSample<f32> for u8

source§

impl FromSample<f32> for u16

source§

impl FromSample<f32> for u32

source§

impl FromSample<f32> for u64

source§

impl FromSample<f64> for f32

source§

impl FromSample<f64> for i8

source§

impl FromSample<f64> for i16

source§

impl FromSample<f64> for i32

source§

impl FromSample<f64> for i64

source§

impl FromSample<f64> for u8

source§

impl FromSample<f64> for u16

source§

impl FromSample<f64> for u32

source§

impl FromSample<f64> for u64

source§

impl FromSample<i8> for f32

source§

impl FromSample<i8> for f64

source§

impl FromSample<i8> for i16

source§

impl FromSample<i8> for i32

source§

impl FromSample<i8> for i64

source§

impl FromSample<i8> for u8

source§

impl FromSample<i8> for u16

source§

impl FromSample<i8> for u32

source§

impl FromSample<i8> for u64

source§

impl FromSample<i16> for f32

source§

impl FromSample<i16> for f64

source§

impl FromSample<i16> for i8

source§

impl FromSample<i16> for i32

source§

impl FromSample<i16> for i64

source§

impl FromSample<i16> for u8

source§

impl FromSample<i16> for u16

source§

impl FromSample<i16> for u32

source§

impl FromSample<i16> for u64

source§

impl FromSample<i32> for f32

source§

impl FromSample<i32> for f64

source§

impl FromSample<i32> for i8

source§

impl FromSample<i32> for i16

source§

impl FromSample<i32> for i64

source§

impl FromSample<i32> for u8

source§

impl FromSample<i32> for u16

source§

impl FromSample<i32> for u32

source§

impl FromSample<i32> for u64

source§

impl FromSample<i64> for f32

source§

impl FromSample<i64> for f64

source§

impl FromSample<i64> for i8

source§

impl FromSample<i64> for i16

source§

impl FromSample<i64> for i32

source§

impl FromSample<i64> for u8

source§

impl FromSample<i64> for u16

source§

impl FromSample<i64> for u32

source§

impl FromSample<i64> for u64

source§

impl FromSample<u8> for f32

source§

impl FromSample<u8> for f64

source§

impl FromSample<u8> for i8

source§

impl FromSample<u8> for i16

source§

impl FromSample<u8> for i32

source§

impl FromSample<u8> for i64

source§

impl FromSample<u8> for u16

source§

impl FromSample<u8> for u32

source§

impl FromSample<u8> for u64

source§

impl FromSample<u16> for f32

source§

impl FromSample<u16> for f64

source§

impl FromSample<u16> for i8

source§

impl FromSample<u16> for i16

source§

impl FromSample<u16> for i32

source§

impl FromSample<u16> for i64

source§

impl FromSample<u16> for u8

source§

impl FromSample<u16> for u32

source§

impl FromSample<u16> for u64

source§

impl FromSample<u32> for f32

source§

impl FromSample<u32> for f64

source§

impl FromSample<u32> for i8

source§

impl FromSample<u32> for i16

source§

impl FromSample<u32> for i32

source§

impl FromSample<u32> for i64

source§

impl FromSample<u32> for u8

source§

impl FromSample<u32> for u16

source§

impl FromSample<u32> for u64

source§

impl FromSample<u64> for f32

source§

impl FromSample<u64> for f64

source§

impl FromSample<u64> for i8

source§

impl FromSample<u64> for i16

source§

impl FromSample<u64> for i32

source§

impl FromSample<u64> for i64

source§

impl FromSample<u64> for u8

source§

impl FromSample<u64> for u16

source§

impl FromSample<u64> for u32

source§

impl FromSample<I24> for f32

source§

impl FromSample<I24> for f64

source§

impl FromSample<I24> for i8

source§

impl FromSample<I24> for i16

source§

impl FromSample<I24> for i32

source§

impl FromSample<I24> for i64

source§

impl FromSample<I24> for u8

source§

impl FromSample<I24> for u16

source§

impl FromSample<I24> for u32

source§

impl FromSample<I24> for u64

source§

impl FromSample<I48> for f32

source§

impl FromSample<I48> for f64

source§

impl FromSample<I48> for i8

source§

impl FromSample<I48> for i16

source§

impl FromSample<I48> for i32

source§

impl FromSample<I48> for i64

source§

impl FromSample<I48> for u8

source§

impl FromSample<I48> for u16

source§

impl FromSample<I48> for u32

source§

impl FromSample<I48> for u64

source§

impl FromSample<U24> for f32

source§

impl FromSample<U24> for f64

source§

impl FromSample<U24> for i8

source§

impl FromSample<U24> for i16

source§

impl FromSample<U24> for i32

source§

impl FromSample<U24> for i64

source§

impl FromSample<U24> for u8

source§

impl FromSample<U24> for u16

source§

impl FromSample<U24> for u32

source§

impl FromSample<U24> for u64

source§

impl FromSample<U48> for f32

source§

impl FromSample<U48> for f64

source§

impl FromSample<U48> for i8

source§

impl FromSample<U48> for i16

source§

impl FromSample<U48> for i32

source§

impl FromSample<U48> for i64

source§

impl FromSample<U48> for u8

source§

impl FromSample<U48> for u16

source§

impl FromSample<U48> for u32

source§

impl FromSample<U48> for u64

Implementors§

source§

impl FromSample<f32> for I24

source§

impl FromSample<f32> for I48

source§

impl FromSample<f32> for U24

source§

impl FromSample<f32> for U48

source§

impl FromSample<f64> for I24

source§

impl FromSample<f64> for I48

source§

impl FromSample<f64> for U24

source§

impl FromSample<f64> for U48

source§

impl FromSample<i8> for I24

source§

impl FromSample<i8> for I48

source§

impl FromSample<i8> for U24

source§

impl FromSample<i8> for U48

source§

impl FromSample<i16> for I24

source§

impl FromSample<i16> for I48

source§

impl FromSample<i16> for U24

source§

impl FromSample<i16> for U48

source§

impl FromSample<i32> for I24

source§

impl FromSample<i32> for I48

source§

impl FromSample<i32> for U24

source§

impl FromSample<i32> for U48

source§

impl FromSample<i64> for I24

source§

impl FromSample<i64> for I48

source§

impl FromSample<i64> for U24

source§

impl FromSample<i64> for U48

source§

impl FromSample<u8> for I24

source§

impl FromSample<u8> for I48

source§

impl FromSample<u8> for U24

source§

impl FromSample<u8> for U48

source§

impl FromSample<u16> for I24

source§

impl FromSample<u16> for I48

source§

impl FromSample<u16> for U24

source§

impl FromSample<u16> for U48

source§

impl FromSample<u32> for I24

source§

impl FromSample<u32> for I48

source§

impl FromSample<u32> for U24

source§

impl FromSample<u32> for U48

source§

impl FromSample<u64> for I24

source§

impl FromSample<u64> for I48

source§

impl FromSample<u64> for U24

source§

impl FromSample<u64> for U48

source§

impl FromSample<I24> for I48

source§

impl FromSample<I24> for U24

source§

impl FromSample<I24> for U48

source§

impl FromSample<I48> for I24

source§

impl FromSample<I48> for U24

source§

impl FromSample<I48> for U48

source§

impl FromSample<U24> for I24

source§

impl FromSample<U24> for I48

source§

impl FromSample<U24> for U48

source§

impl FromSample<U48> for I24

source§

impl FromSample<U48> for I48

source§

impl FromSample<U48> for U24

source§

impl<S> FromSample<S> for S