pub struct Waveform<T: SampleType, P: Precision = f32> { /* private fields */ }
Expand description
Struct representing a waveform, consisting of output numeric type, sampling rate and a vector of PeriodicFunction
s.
Implementations§
Source§impl<T: SampleType, P: Precision> Waveform<T, P>
impl<T: SampleType, P: Precision> Waveform<T, P>
Sourcepub fn with_components(
sample_rate: impl Into<P>,
components: Vec<PeriodicFunction<P>>,
) -> Self
pub fn with_components( sample_rate: impl Into<P>, components: Vec<PeriodicFunction<P>>, ) -> Self
Sourcepub fn add_component(&mut self, component: PeriodicFunction<P>)
pub fn add_component(&mut self, component: PeriodicFunction<P>)
Sourcepub fn sample_rate(&self) -> &P
pub fn sample_rate(&self) -> &P
Sourcepub fn components(&self) -> &Vec<PeriodicFunction<P>>
pub fn components(&self) -> &Vec<PeriodicFunction<P>>
Trait Implementations§
Source§impl<'a, T: SampleType, P: Precision> IntoIterator for &'a Waveform<T, P>
impl<'a, T: SampleType, P: Precision> IntoIterator for &'a Waveform<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for Waveform<T, P>where
P: Freeze,
impl<T, P = f32> !RefUnwindSafe for Waveform<T, P>
impl<T, P> Send for Waveform<T, P>where
T: Send,
impl<T, P> Sync for Waveform<T, P>where
T: Sync,
impl<T, P> Unpin for Waveform<T, P>
impl<T, P = f32> !UnwindSafe for Waveform<T, P>
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