[−][src]Struct sample::types::u24::U24
Implementations
impl U24
[src]
pub fn new(val: i32) -> Option<Self>
[src]
Construct a new sample if the given value is within range.
Returns None
if val
is out of range.
pub fn new_unchecked(s: i32) -> Self
[src]
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.
pub fn inner(self) -> i32
[src]
Return the internal value used to represent the sample type.
Trait Implementations
impl Add<U24> for U24
[src]
type Output = U24
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl BitAnd<U24> for U24
[src]
type Output = U24
The resulting type after applying the &
operator.
fn bitand(self, other: Self) -> Self
[src]
impl BitOr<U24> for U24
[src]
type Output = U24
The resulting type after applying the |
operator.
fn bitor(self, other: Self) -> Self
[src]
impl BitXor<U24> for U24
[src]
type Output = U24
The resulting type after applying the ^
operator.
fn bitxor(self, other: Self) -> Self
[src]
impl Clone for U24
[src]
impl Copy for U24
[src]
impl Debug for U24
[src]
impl Default for U24
[src]
impl Div<U24> for U24
[src]
type Output = U24
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Eq for U24
[src]
impl From<U20> for U24
[src]
impl From<U24> for I48
[src]
impl From<U24> for U48
[src]
impl From<i32> for U24
[src]
impl From<u16> for U24
[src]
impl From<u8> for U24
[src]
impl FromSample<I24> for U24
[src]
fn from_sample_(s: I24) -> Self
[src]
impl FromSample<I48> for U24
[src]
fn from_sample_(s: I48) -> Self
[src]
impl FromSample<U24> for i8
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for i16
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for u64
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for f32
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for f64
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for I24
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for i32
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for I48
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for i64
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for u8
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for u16
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for u32
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U24> for U48
[src]
fn from_sample_(s: U24) -> Self
[src]
impl FromSample<U48> for U24
[src]
fn from_sample_(s: U48) -> Self
[src]
impl FromSample<f32> for U24
[src]
fn from_sample_(s: f32) -> Self
[src]
impl FromSample<f64> for U24
[src]
fn from_sample_(s: f64) -> Self
[src]
impl FromSample<i16> for U24
[src]
fn from_sample_(s: i16) -> Self
[src]
impl FromSample<i32> for U24
[src]
fn from_sample_(s: i32) -> Self
[src]
impl FromSample<i64> for U24
[src]
fn from_sample_(s: i64) -> Self
[src]
impl FromSample<i8> for U24
[src]
fn from_sample_(s: i8) -> Self
[src]
impl FromSample<u16> for U24
[src]
fn from_sample_(s: u16) -> Self
[src]
impl FromSample<u32> for U24
[src]
fn from_sample_(s: u32) -> Self
[src]
impl FromSample<u64> for U24
[src]
fn from_sample_(s: u64) -> Self
[src]
impl FromSample<u8> for U24
[src]
fn from_sample_(s: u8) -> Self
[src]
impl Mul<U24> for U24
[src]
type Output = U24
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Not for U24
[src]
impl Ord for U24
[src]
fn cmp(&self, other: &U24) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<U24> for U24
[src]
impl PartialOrd<U24> for U24
[src]
fn partial_cmp(&self, other: &U24) -> Option<Ordering>
[src]
fn lt(&self, other: &U24) -> bool
[src]
fn le(&self, other: &U24) -> bool
[src]
fn gt(&self, other: &U24) -> bool
[src]
fn ge(&self, other: &U24) -> bool
[src]
impl Rem<U24> for U24
[src]
type Output = U24
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
impl Sample for U24
[src]
type Signed = i32
When summing two samples of a signal together, it is necessary for both samples to be represented in some signed format. This associated Addition
type represents the format to which Self
should be converted for optimal Addition
performance. Read more
type Float = f32
When multiplying two samples of a signal together, it is necessary for both samples to be represented in some signed, floating-point format. This associated Multiplication
type represents the format to which Self
should be converted for optimal Multiplication
performance. Read more
fn equilibrium() -> Self
[src]
fn identity() -> Self::Float
[src]
fn to_sample<S>(self) -> S where
Self: ToSample<S>,
[src]
Self: ToSample<S>,
fn from_sample<S>(s: S) -> Self where
Self: FromSample<S>,
[src]
Self: FromSample<S>,
fn to_signed_sample(self) -> Self::Signed
[src]
fn to_float_sample(self) -> Self::Float
[src]
fn add_amp(self, amp: Self::Signed) -> Self
[src]
fn mul_amp(self, amp: Self::Float) -> Self
[src]
impl Shl<U24> for U24
[src]
type Output = U24
The resulting type after applying the <<
operator.
fn shl(self, other: Self) -> Self
[src]
impl Shr<U24> for U24
[src]
type Output = U24
The resulting type after applying the >>
operator.
fn shr(self, other: Self) -> Self
[src]
impl StructuralEq for U24
[src]
impl StructuralPartialEq for U24
[src]
impl Sub<U24> for U24
[src]
Auto Trait Implementations
impl RefUnwindSafe for U24
impl Send for U24
impl Sync for U24
impl Unpin for U24
impl UnwindSafe for U24
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> From<T> for T
[src]
impl<S> FromSample<S> for S
[src]
fn from_sample_(S) -> S
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(Self) -> U
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,