Skip to main content

PerformanceEngine

Struct PerformanceEngine 

Source
pub struct PerformanceEngine<'a, State: PerformanceState> { /* private fields */ }

Implementations§

Source§

impl<'a, State: PerformanceState> PerformanceEngine<'a, State>

Source

pub fn new( composition: &'a Composition, state: &'a mut State, sample_paths_metronome: &Vec<String>, sample_paths_piano: &Vec<String>, ) -> Result<Self, FailResult>

Source

pub fn run(&mut self)

Source

pub fn run_from( &mut self, start_time: &MusicTime, starting_pattern_index: usize, )

Source

pub fn set_metronome_enabled(&mut self, is_enabled: bool)

Trait Implementations§

Source§

impl<'a, State: PerformanceState> MusicTimerState for PerformanceEngine<'a, State>

Source§

fn on_beat_interval(&mut self, current_time: &MusicTime)

Called when the beat interval changes. Read more
Source§

fn on_beat(&mut self, current_time: &MusicTime)

Called when the beat changes. Read more
Source§

fn on_bar(&mut self, current_time: &MusicTime)

Called when the bar changes Read more

Auto Trait Implementations§

§

impl<'a, State> Freeze for PerformanceEngine<'a, State>

§

impl<'a, State> RefUnwindSafe for PerformanceEngine<'a, State>
where State: RefUnwindSafe,

§

impl<'a, State> Send for PerformanceEngine<'a, State>
where State: Send,

§

impl<'a, State> Sync for PerformanceEngine<'a, State>
where State: Sync,

§

impl<'a, State> Unpin for PerformanceEngine<'a, State>

§

impl<'a, State> UnsafeUnpin for PerformanceEngine<'a, State>

§

impl<'a, State> !UnwindSafe for PerformanceEngine<'a, State>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V