Struct dsp::sample::U24 []

pub struct U24(_);

Methods

impl U24

fn new(val: i32) -> Option<U24>

Construct a new sample if the given value is within range.

Returns None if val is out of range.

fn new_unchecked(s: i32) -> U24

Constructs a new sample without checking for overflowing.

This should only be used if the user can guarantee the sample will be within range and they require the extra performance.

If this function is used, the sample crate can't guarantee that the returned sample or any interacting samples will remain within their MIN and MAX bounds.

fn inner(self) -> i32

Return the internal value used to represent the sample type.

Trait Implementations

impl Default for U24

fn default() -> U24

Returns the "default value" for a type. Read more

impl Ord for U24

fn cmp(&self, __arg_0: &U24) -> Ordering

impl PartialOrd<U24> for U24

fn partial_cmp(&self, __arg_0: &U24) -> Option<Ordering>

fn lt(&self, __arg_0: &U24) -> bool

fn le(&self, __arg_0: &U24) -> bool

fn gt(&self, __arg_0: &U24) -> bool

fn ge(&self, __arg_0: &U24) -> bool

impl Eq for U24

impl PartialEq<U24> for U24

fn eq(&self, __arg_0: &U24) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &U24) -> bool

This method tests for !=.

impl Debug for U24

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Clone for U24

fn clone(&self) -> U24

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for U24

impl From<i32> for U24

fn from(val: i32) -> U24

impl Add<U24> for U24

type Output = U24

fn add(self, other: U24) -> U24

impl Sub<U24> for U24

type Output = U24

fn sub(self, other: U24) -> U24

impl Mul<U24> for U24

type Output = U24

fn mul(self, other: U24) -> U24

impl Div<U24> for U24

type Output = U24

fn div(self, other: U24) -> U24

impl Not for U24

type Output = U24

fn not(self) -> U24

impl Rem<U24> for U24

type Output = U24

fn rem(self, other: U24) -> U24

impl Shl<U24> for U24

type Output = U24

fn shl(self, other: U24) -> U24

impl Shr<U24> for U24

type Output = U24

fn shr(self, other: U24) -> U24

impl BitAnd<U24> for U24

type Output = U24

fn bitand(self, other: U24) -> U24

impl BitOr<U24> for U24

type Output = U24

fn bitor(self, other: U24) -> U24

impl BitXor<U24> for U24

type Output = U24

fn bitxor(self, other: U24) -> U24

impl From<u8> for U24

fn from(other: u8) -> U24

impl From<u16> for U24

fn from(other: u16) -> U24

impl From<U20> for U24

fn from(other: U20) -> U24

impl FromSample<i8> for U24

fn from_sample_(s: i8) -> U24

impl FromSample<i16> for U24

fn from_sample_(s: i16) -> U24

impl FromSample<I24> for U24

fn from_sample_(s: I24) -> U24

impl FromSample<i32> for U24

fn from_sample_(s: i32) -> U24

impl FromSample<I48> for U24

fn from_sample_(s: I48) -> U24

impl FromSample<i64> for U24

fn from_sample_(s: i64) -> U24

impl FromSample<u8> for U24

fn from_sample_(s: u8) -> U24

impl FromSample<u16> for U24

fn from_sample_(s: u16) -> U24

impl FromSample<u32> for U24

fn from_sample_(s: u32) -> U24

impl FromSample<U48> for U24

fn from_sample_(s: U48) -> U24

impl FromSample<u64> for U24

fn from_sample_(s: u64) -> U24

impl FromSample<f32> for U24

fn from_sample_(s: f32) -> U24

impl FromSample<f64> for U24

fn from_sample_(s: f64) -> U24

impl Sample for U24

fn equilibrium() -> U24

The equilibrium value for the wave that this Sample type represents. This is normally the value that is equal distance from both the min and max ranges of the sample. Read more

fn to_sample<S>(self) -> S where Self: ToSample<S>

Convert self to any type that implements FromSample.

fn from_sample<S>(s: S) -> Self where Self: FromSample<S>

Create a Self from any type that implements ToSample.