Trait SampleType

Source
pub trait SampleType: Numeric {
    type Longer;
    type Shorter;
    type Signed;
    type Unsigned;

    const MIDNUM: Self;
Show 46 methods // Required methods fn new() -> Self; fn zero() -> Self; fn from(v: impl SampleType) -> Self; fn average(s1: Self, s2: Self) -> Self; fn average_arr(arr: &[Self]) -> Self; fn to_i8(&self) -> i8; fn to_i16(&self) -> i16; fn to_i24(&self) -> i24; fn to_i32(&self) -> i32; fn to_i64(&self) -> i64; fn to_u8(&self) -> u8; fn to_u16(&self) -> u16; fn to_u24(&self) -> u24; fn to_u32(&self) -> u32; fn to_u64(&self) -> u64; fn to_f32(&self) -> f32; fn to_f64(&self) -> f64; fn to_i128(&self) -> i128; fn to_u128(&self) -> u128; fn as_i8(&self) -> i8; fn as_i16(&self) -> i16; fn as_i24(&self) -> i24; fn as_i32(&self) -> i32; fn as_i64(&self) -> i64; fn as_u8(&self) -> u8; fn as_u16(&self) -> u16; fn as_u24(&self) -> u24; fn as_u32(&self) -> u32; fn as_u64(&self) -> u64; fn as_f32(&self) -> f32; fn as_f64(&self) -> f64; fn as_i128(&self) -> i128; fn as_u128(&self) -> u128; fn to_longer(&self) -> Self::Longer; fn to_shorter(&self) -> Self::Shorter; fn is_signed() -> bool; fn is_unsigned() -> bool; fn is_integer() -> bool; fn is_float() -> bool; fn to_signed(&self) -> Self::Signed; fn to_unsigned(&self) -> Self::Unsigned; fn read_le<T>(r: &mut T) -> Result<Self, Error> where T: Read + ?Sized; fn read_be<T>(r: &mut T) -> Result<Self, Error> where T: Read + ?Sized; fn write_le<T>(&self, w: &mut T) -> Result<(), Error> where T: Write + ?Sized; fn write_be<T>(&self, w: &mut T) -> Result<(), Error> where T: Write + ?Sized; // Provided method fn sizeof(&self) -> usize { ... }
}

Required Associated Constants§

Source

const MIDNUM: Self

Required Associated Types§

Required Methods§

Source

fn new() -> Self

Source

fn zero() -> Self

Source

fn from(v: impl SampleType) -> Self

Source

fn average(s1: Self, s2: Self) -> Self

Source

fn average_arr(arr: &[Self]) -> Self

Source

fn to_i8(&self) -> i8

Source

fn to_i16(&self) -> i16

Source

fn to_i24(&self) -> i24

Source

fn to_i32(&self) -> i32

Source

fn to_i64(&self) -> i64

Source

fn to_u8(&self) -> u8

Source

fn to_u16(&self) -> u16

Source

fn to_u24(&self) -> u24

Source

fn to_u32(&self) -> u32

Source

fn to_u64(&self) -> u64

Source

fn to_f32(&self) -> f32

Source

fn to_f64(&self) -> f64

Source

fn to_i128(&self) -> i128

Source

fn to_u128(&self) -> u128

Source

fn as_i8(&self) -> i8

Source

fn as_i16(&self) -> i16

Source

fn as_i24(&self) -> i24

Source

fn as_i32(&self) -> i32

Source

fn as_i64(&self) -> i64

Source

fn as_u8(&self) -> u8

Source

fn as_u16(&self) -> u16

Source

fn as_u24(&self) -> u24

Source

fn as_u32(&self) -> u32

Source

fn as_u64(&self) -> u64

Source

fn as_f32(&self) -> f32

Source

fn as_f64(&self) -> f64

Source

fn as_i128(&self) -> i128

Source

fn as_u128(&self) -> u128

Source

fn to_longer(&self) -> Self::Longer

Source

fn to_shorter(&self) -> Self::Shorter

Source

fn is_signed() -> bool

Source

fn is_unsigned() -> bool

Source

fn is_integer() -> bool

Source

fn is_float() -> bool

Source

fn to_signed(&self) -> Self::Signed

Source

fn to_unsigned(&self) -> Self::Unsigned

Source

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Provided Methods§

Source

fn sizeof(&self) -> usize

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

Source§

const MIDNUM: f32 = 0f32

Source§

type Longer = f64

Source§

type Shorter = f32

Source§

type Signed = f32

Source§

type Unsigned = f32

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for f64

Source§

const MIDNUM: f64 = 0f64

Source§

type Longer = f64

Source§

type Shorter = f32

Source§

type Signed = f64

Source§

type Unsigned = f64

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for i8

Source§

const MIDNUM: i8 = 0i8

Source§

type Longer = i16

Source§

type Shorter = i8

Source§

type Signed = i8

Source§

type Unsigned = u8

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for i16

Source§

const MIDNUM: i16 = 0i16

Source§

type Longer = i24

Source§

type Shorter = i8

Source§

type Signed = i16

Source§

type Unsigned = u16

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for i32

Source§

const MIDNUM: i32 = 0i32

Source§

type Longer = i64

Source§

type Shorter = i24

Source§

type Signed = i32

Source§

type Unsigned = u32

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for i64

Source§

const MIDNUM: i64 = 0i64

Source§

type Longer = i128

Source§

type Shorter = i32

Source§

type Signed = i64

Source§

type Unsigned = u64

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for i128

Source§

const MIDNUM: i128 = 0i128

Source§

type Longer = i128

Source§

type Shorter = i64

Source§

type Signed = i128

Source§

type Unsigned = u128

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for u8

Source§

const MIDNUM: u8 = 128u8

Source§

type Longer = u16

Source§

type Shorter = u8

Source§

type Signed = i8

Source§

type Unsigned = u8

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for u16

Source§

const MIDNUM: u16 = 32_768u16

Source§

type Longer = u24

Source§

type Shorter = u8

Source§

type Signed = i16

Source§

type Unsigned = u16

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for u32

Source§

const MIDNUM: u32 = 2_147_483_648u32

Source§

type Longer = u64

Source§

type Shorter = u24

Source§

type Signed = i32

Source§

type Unsigned = u32

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for u64

Source§

const MIDNUM: u64 = 9_223_372_036_854_775_808u64

Source§

type Longer = u128

Source§

type Shorter = u32

Source§

type Signed = i64

Source§

type Unsigned = u64

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

impl SampleType for u128

Source§

const MIDNUM: u128 = 170_141_183_460_469_231_731_687_303_715_884_105_728u128

Source§

type Longer = u128

Source§

type Shorter = u64

Source§

type Signed = i128

Source§

type Unsigned = u128

Source§

fn new() -> Self

Source§

fn zero() -> Self

Source§

fn from(v: impl SampleType) -> Self

Source§

fn average(s1: Self, s2: Self) -> Self

Source§

fn average_arr(arr: &[Self]) -> Self

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i24(&self) -> i24

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u24(&self) -> u24

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn to_f32(&self) -> f32

Source§

fn to_f64(&self) -> f64

Source§

fn to_i128(&self) -> i128

Source§

fn to_u128(&self) -> u128

Source§

fn as_i8(&self) -> i8

Source§

fn as_i16(&self) -> i16

Source§

fn as_i24(&self) -> i24

Source§

fn as_i32(&self) -> i32

Source§

fn as_i64(&self) -> i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u24(&self) -> u24

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_f32(&self) -> f32

Source§

fn as_f64(&self) -> f64

Source§

fn as_i128(&self) -> i128

Source§

fn as_u128(&self) -> u128

Source§

fn to_longer(&self) -> Self::Longer

Source§

fn to_shorter(&self) -> Self::Shorter

Source§

fn is_signed() -> bool

Source§

fn is_unsigned() -> bool

Source§

fn is_integer() -> bool

Source§

fn is_float() -> bool

Source§

fn to_signed(&self) -> Self::Signed

Source§

fn to_unsigned(&self) -> Self::Unsigned

Source§

fn read_le<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn read_be<T>(r: &mut T) -> Result<Self, Error>
where T: Read + ?Sized,

Source§

fn write_le<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Source§

fn write_be<T>(&self, w: &mut T) -> Result<(), Error>
where T: Write + ?Sized,

Implementors§