#[repr(C)]pub struct u24(pub u8, pub u8, pub u8);Expand description
- The tuple struct is little-endian
Tuple Fields§
§0: u8§1: u8§2: u8Implementations§
Source§impl u24
impl u24
pub const MAX: u24
pub const MIN: u24
pub fn from_le_bytes(bytes: [u8; 3]) -> Self
pub fn from_be_bytes(bytes: [u8; 3]) -> Self
pub fn to_le_bytes(self) -> [u8; 3]
pub fn to_be_bytes(self) -> [u8; 3]
pub fn as_i128(self) -> i128
pub fn as_i64(self) -> i64
pub fn as_i32(self) -> i32
pub fn as_i16(self) -> i16
pub fn as_i8(self) -> i8
pub fn as_u128(self) -> u128
pub fn as_u64(self) -> u64
pub fn as_u32(self) -> u32
pub fn as_u16(self) -> u16
pub fn as_u8(self) -> u8
pub fn as_f32(self) -> f32
pub fn as_f64(self) -> f64
pub fn clamp(self, min: Self, max: Self) -> Self
Trait Implementations§
Source§impl AddAssign for u24
impl AddAssign for u24
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl BitAndAssign for u24
impl BitAndAssign for u24
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign for u24
impl BitOrAssign for u24
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign for u24
impl BitXorAssign for u24
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl DivAssign for u24
impl DivAssign for u24
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign for u24
impl MulAssign for u24
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for u24
impl Ord for u24
Source§impl PartialOrd for u24
impl PartialOrd for u24
Source§impl RemAssign for u24
impl RemAssign for u24
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl SampleFrom for u24
impl SampleFrom for u24
Source§fn to<S>(s: S) -> Selfwhere
S: SampleType,
fn to<S>(s: S) -> Selfwhere
S: SampleType,
The
to<S> method, input any type of SampleType value, then scale it to ImplFor type.Source§fn as_<S>(s: S) -> Selfwhere
S: SampleType,
fn as_<S>(s: S) -> Selfwhere
S: SampleType,
The
as_<S> method, input any type of SampleType value, then cast it to ImplFor type.Source§fn sin<S>(s: S) -> Selfwhere
S: SampleType,
fn sin<S>(s: S) -> Selfwhere
S: SampleType,
Sine wave generator Read more
Source§fn cos<S>(s: S) -> Selfwhere
S: SampleType,
fn cos<S>(s: S) -> Selfwhere
S: SampleType,
Cosine wave generator Read more
Source§impl SampleType for u24
impl SampleType for u24
Source§fn new() -> Self
fn new() -> Self
Create a new sample, the value is the middle value of the range of the format.
Source§fn scale_from<T>(v: T) -> Selfwhere
T: SampleType,
fn scale_from<T>(v: T) -> Selfwhere
T: SampleType,
Scale a sample to this specified format.
Source§fn cast_from<T>(v: T) -> Selfwhere
T: SampleType,
fn cast_from<T>(v: T) -> Selfwhere
T: SampleType,
Cast a sample to this specified format.
Source§fn average_arr(arr: &[Self]) -> Self
fn average_arr(arr: &[Self]) -> Self
Get the average value from a sample array.
Source§fn clamp_to_i8(self) -> i8
fn clamp_to_i8(self) -> i8
Clamp to
i8Source§fn clamp_to_i16(self) -> i16
fn clamp_to_i16(self) -> i16
Clamp to
i16Source§fn clamp_to_i24(self) -> i24
fn clamp_to_i24(self) -> i24
Clamp to
i24Source§fn clamp_to_i32(self) -> i32
fn clamp_to_i32(self) -> i32
Clamp to
i32Source§fn clamp_to_i64(self) -> i64
fn clamp_to_i64(self) -> i64
Clamp to
i64Source§fn clamp_to_u8(self) -> u8
fn clamp_to_u8(self) -> u8
Clamp to
u8Source§fn clamp_to_u16(self) -> u16
fn clamp_to_u16(self) -> u16
Clamp to
u16Source§fn clamp_to_u24(self) -> u24
fn clamp_to_u24(self) -> u24
Clamp to
u24Source§fn clamp_to_u32(self) -> u32
fn clamp_to_u32(self) -> u32
Clamp to
u32Source§fn clamp_to_u64(self) -> u64
fn clamp_to_u64(self) -> u64
Clamp to
u64Source§fn clamp_to_f32(self) -> f32
fn clamp_to_f32(self) -> f32
Clamp to
f32Source§fn clamp_to_f64(self) -> f64
fn clamp_to_f64(self) -> f64
Clamp to
f64Source§fn clamp_to_i128(self) -> i128
fn clamp_to_i128(self) -> i128
Clamp to
i128Source§fn clamp_to_u128(self) -> u128
fn clamp_to_u128(self) -> u128
Clamp to
u128Source§fn to_shorter(self) -> Self::Shorter
fn to_shorter(self) -> Self::Shorter
Scale to a shorter type, the shortest type is
i8 or u8Source§fn as_shorter(self) -> Self::Shorter
fn as_shorter(self) -> Self::Shorter
Cast to a shorter type, the shortest type is
i8 or u8Source§fn is_unsigned() -> bool
fn is_unsigned() -> bool
Is this type an unsigned type?
Source§fn is_integer() -> bool
fn is_integer() -> bool
Is this type an integer type?
Source§fn to_unsigned(self) -> Self::Unsigned
fn to_unsigned(self) -> Self::Unsigned
Convert to an unsigned number type. No effects to
f32 and f64Source§fn sin<S>(self) -> Swhere
S: SampleType,
fn sin<S>(self) -> Swhere
S: SampleType,
Sine wave generator Read more
Source§fn cos<S>(self) -> Swhere
S: SampleType,
fn cos<S>(self) -> Swhere
S: SampleType,
Cosine wave generator Read more
Source§fn interpolate(self, target: Self, s: f64) -> Self
fn interpolate(self, target: Self, s: f64) -> Self
interpolate between
self to target by sSource§impl ShlAssign for u24
impl ShlAssign for u24
Source§fn shl_assign(&mut self, rhs: Self)
fn shl_assign(&mut self, rhs: Self)
Performs the
<<= operation. Read moreSource§impl ShrAssign for u24
impl ShrAssign for u24
Source§fn shr_assign(&mut self, rhs: Self)
fn shr_assign(&mut self, rhs: Self)
Performs the
>>= operation. Read moreSource§impl SubAssign for u24
impl SubAssign for u24
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for u24
impl Eq for u24
impl StructuralPartialEq for u24
Auto Trait Implementations§
impl Freeze for u24
impl RefUnwindSafe for u24
impl Send for u24
impl Sync for u24
impl Unpin for u24
impl UnwindSafe for u24
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more