dasp_sample::conv

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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