Trait dasp_sample::conv::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§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for i8

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for i16

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for i32

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for i64

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for u8

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for u16

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for u32

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f32> for u64

source§

fn from_sample_(s: f32) -> Self

source§

impl FromSample<f64> for f32

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for i8

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for i16

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for i32

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for i64

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for u8

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for u16

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for u32

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<f64> for u64

source§

fn from_sample_(s: f64) -> Self

source§

impl FromSample<i8> for f32

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for f64

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for i16

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for i32

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for i64

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for u8

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for u16

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for u32

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i8> for u64

source§

fn from_sample_(s: i8) -> Self

source§

impl FromSample<i16> for f32

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for f64

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for i8

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for i32

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for i64

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for u8

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for u16

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for u32

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i16> for u64

source§

fn from_sample_(s: i16) -> Self

source§

impl FromSample<i32> for f32

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for f64

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for i8

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for i16

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for i64

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for u8

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for u16

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for u32

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i32> for u64

source§

fn from_sample_(s: i32) -> Self

source§

impl FromSample<i64> for f32

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for f64

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for i8

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for i16

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for i32

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for u8

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for u16

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for u32

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<i64> for u64

source§

fn from_sample_(s: i64) -> Self

source§

impl FromSample<u8> for f32

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for f64

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for i8

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for i16

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for i32

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for i64

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for u16

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for u32

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u8> for u64

source§

fn from_sample_(s: u8) -> Self

source§

impl FromSample<u16> for f32

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for f64

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for i8

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for i16

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for i32

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for i64

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for u8

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for u32

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u16> for u64

source§

fn from_sample_(s: u16) -> Self

source§

impl FromSample<u32> for f32

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for f64

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for i8

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for i16

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for i32

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for i64

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for u8

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for u16

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u32> for u64

source§

fn from_sample_(s: u32) -> Self

source§

impl FromSample<u64> for f32

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for f64

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for i8

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for i16

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for i32

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for i64

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for u8

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for u16

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<u64> for u32

source§

fn from_sample_(s: u64) -> Self

source§

impl FromSample<I24> for f32

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for f64

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for i8

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for i16

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for i32

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for i64

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for u8

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for u16

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for u32

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I24> for u64

source§

fn from_sample_(s: I24) -> Self

source§

impl FromSample<I48> for f32

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for f64

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for i8

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for i16

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for i32

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for i64

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for u8

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for u16

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for u32

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<I48> for u64

source§

fn from_sample_(s: I48) -> Self

source§

impl FromSample<U24> for f32

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for f64

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for i8

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for i16

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for i32

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for i64

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for u8

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for u16

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for u32

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U24> for u64

source§

fn from_sample_(s: U24) -> Self

source§

impl FromSample<U48> for f32

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for f64

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for i8

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for i16

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for i32

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for i64

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for u8

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for u16

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for u32

source§

fn from_sample_(s: U48) -> Self

source§

impl FromSample<U48> for u64

source§

fn from_sample_(s: U48) -> Self

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