Trait rustpotter::Sample
source · pub trait Sample: Sized + Copy + PartialOrd + Display + 'static + Send {
const S_TYPE: SampleFormat;
// Required methods
fn get_byte_size() -> usize;
fn get_format() -> SampleFormat;
fn get_zero() -> Self;
fn from_le_bytes(bytes: &[u8]) -> Self;
fn from_be_bytes(bytes: &[u8]) -> Self;
fn from_ne_bytes(bytes: &[u8]) -> Self;
fn into_f32(self) -> f32;
}Expand description
Trait for compatible sample number types