#[repr(C)]pub struct Env(pub f64);Expand description
A data sample from an envelope, typically holding a value between -1.0 and 1.0.
This is distinguished from Mono, as they have different uses. There shouldn’t be much reason
to convert one to the other.
Tuple Fields§
§0: f64Implementations§
Trait Implementations§
Source§impl AddAssign for Env
impl AddAssign for Env
Source§fn add_assign(&mut self, rhs: Env)
fn add_assign(&mut self, rhs: Env)
Performs the
+= operation. Read moreSource§impl Array for Env
Safety: The type is tagged as #[repr(C)].
impl Array for Env
Safety: The type is tagged as #[repr(C)].
Source§fn from_array(array: [f64; 1]) -> Self
fn from_array(array: [f64; 1]) -> Self
Creates a value from an array.
Source§fn into_array(self) -> [f64; 1]
fn into_array(self) -> [f64; 1]
Turns this value into an array.
Source§fn new_default() -> Self
fn new_default() -> Self
Initializes a new array with default values.
Source§fn get_mut(&mut self, index: usize) -> Option<&mut Self::Item>
fn get_mut(&mut self, index: usize) -> Option<&mut Self::Item>
Gets a mutable reference to the value from channel
index. Read moreSource§fn _index_mut(&mut self, index: usize) -> &mut Self::Item
fn _index_mut(&mut self, index: usize) -> &mut Self::Item
Currently,
rust-analyzer trips up sometimes that &mut self[index] is called directly,
complaining that self is immutable. This hack bypasses this.Source§fn map<F: FnMut(&Self::Item) -> Self::Item>(&self, f: F) -> Self
fn map<F: FnMut(&Self::Item) -> Self::Item>(&self, f: F) -> Self
Applies a function
f to all entries of the sample.Source§fn map_array<T: Array, F: FnMut(&Self::Item) -> T::Item>(&self, f: F) -> T
fn map_array<T: Array, F: FnMut(&Self::Item) -> T::Item>(&self, f: F) -> T
Applies a function
f to all entries of the sample.Source§fn map_mut<F: FnMut(&mut Self::Item)>(&mut self, f: F)
fn map_mut<F: FnMut(&mut Self::Item)>(&mut self, f: F)
Mutably applies a function
f to all entries of the sample.Source§fn pairwise<F: FnMut(&Self::Item, &Self::Item) -> Self::Item>(
&self,
rhs: Self,
f: F,
) -> Self
fn pairwise<F: FnMut(&Self::Item, &Self::Item) -> Self::Item>( &self, rhs: Self, f: F, ) -> Self
Applies a function
f to pairs of entries of the samples.Source§fn pairwise_mut<F: FnMut(&mut Self::Item, &Self::Item)>(
&mut self,
rhs: Self,
f: F,
)
fn pairwise_mut<F: FnMut(&mut Self::Item, &Self::Item)>( &mut self, rhs: Self, f: F, )
Mutably applies a function
f to pairs of entries of the samples.Source§impl Distribution<Env> for Standard
impl Distribution<Env> for Standard
Source§impl<__RhsT> DivAssign<__RhsT> for Env
impl<__RhsT> DivAssign<__RhsT> for Env
Source§fn div_assign(&mut self, rhs: __RhsT)
fn div_assign(&mut self, rhs: __RhsT)
Performs the
/= operation. Read moreSource§impl<__RhsT> MulAssign<__RhsT> for Env
impl<__RhsT> MulAssign<__RhsT> for Env
Source§fn mul_assign(&mut self, rhs: __RhsT)
fn mul_assign(&mut self, rhs: __RhsT)
Performs the
*= operation. Read moreSource§impl Sample for Env
impl Sample for Env
Source§fn fst_mut(&mut self) -> &mut f64
fn fst_mut(&mut self) -> &mut f64
Gets a mutable reference to the value from the first channel.
Source§fn snd_mut(&mut self) -> &mut f64
fn snd_mut(&mut self) -> &mut f64
Gets a mutable reference to the value from the second channel, defaulting to the first.
Source§fn rand_with<R: Rng + ?Sized>(rng: &mut R) -> Self
fn rand_with<R: Rng + ?Sized>(rng: &mut R) -> Self
Generates a random sample from a given
Rng object. Read moreSource§fn _sum<I: IntoIterator<Item = Self>>(iter: I) -> Self
fn _sum<I: IntoIterator<Item = Self>>(iter: I) -> Self
A default implementation of the
Sum trait.Source§impl SubAssign for Env
impl SubAssign for Env
Source§fn sub_assign(&mut self, rhs: Env)
fn sub_assign(&mut self, rhs: Env)
Performs the
-= operation. Read moreimpl Copy for Env
impl StructuralPartialEq for Env
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
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