Struct sampler::map::Sample
[−]
[src]
pub struct Sample<A> { pub base_hz: Hz, pub base_vel: Velocity, pub audio: A, }
A performable Sample
with some base playback Hz and Velocity.
Fields
base_hz: Hz
base_vel: Velocity
audio: A
Methods
impl<A> Sample<A>
[src]
fn new(base_hz: Hz, base_vel: Velocity, audio: A) -> Self
Constructor for a new Sample
with the given base Hz and Velocity.
fn map_audio<F, B>(self, map: F) -> Sample<B> where
F: FnOnce(A) -> B,
F: FnOnce(A) -> B,
Maps the Sample
with some Audio
type A
to a Sample
with some Audio
type B
.
Trait Implementations
impl<A: Clone> Clone for Sample<A>
[src]
fn clone(&self) -> Sample<A>
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