pub trait FromSample<F> {
    // Required method
    fn from_sample(val: F) -> Self;
}
Expand description

FromSample implements a conversion from Sample type F to Self.

This may be a lossy conversion if converting from a sample type of higher precision to one of lower precision. No dithering is applied.

Required Methods§

source

fn from_sample(val: F) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromSample<f32> for f32

source§

fn from_sample(s: f32) -> Self

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 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<f64> for f32

source§

fn from_sample(s: f64) -> Self

source§

impl FromSample<f64> for f64

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 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<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 i8

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 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<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 i16

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 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<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 i32

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<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 u8

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<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 u8

source§

fn from_sample(s: u16) -> Self

source§

impl FromSample<u16> for u16

source§

fn from_sample(s: u16) -> Self

source§

impl FromSample<u16> for u32

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 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 u32

source§

fn from_sample(s: u32) -> 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 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<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 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

Implementors§