#[non_exhaustive]pub struct Sequencer<'d, 's> { /* private fields */ }Expand description
A composition of sequences that can be started and stopped. Takes at least one sequence along with its configuration. Optionally takes a second sequence and its configuration. In the case where no second sequence is provided then the first sequence is used.
Implementations§
Source§impl<'d, 's> Sequencer<'d, 's>
impl<'d, 's> Sequencer<'d, 's>
Sourcepub fn new(
pwm: &'s mut SequencePwm<'d>,
sequence0: Sequence<'s>,
sequence1: Option<Sequence<'s>>,
) -> Self
pub fn new( pwm: &'s mut SequencePwm<'d>, sequence0: Sequence<'s>, sequence1: Option<Sequence<'s>>, ) -> Self
Create a new double sequence. In the absence of sequence 1, sequence 0 will be used twice in the one loop.
Sourcepub fn start(
&self,
start_seq: StartSequence,
times: SequenceMode,
) -> Result<(), Error>
pub fn start( &self, start_seq: StartSequence, times: SequenceMode, ) -> Result<(), Error>
Start or restart playback. The sequence mode applies to both sequences combined as one.
Trait Implementations§
Auto Trait Implementations§
impl<'d, 's> !UnwindSafe for Sequencer<'d, 's>
impl<'d, 's> Freeze for Sequencer<'d, 's>
impl<'d, 's> RefUnwindSafe for Sequencer<'d, 's>
impl<'d, 's> Send for Sequencer<'d, 's>
impl<'d, 's> Sync for Sequencer<'d, 's>
impl<'d, 's> Unpin for Sequencer<'d, 's>
impl<'d, 's> UnsafeUnpin for Sequencer<'d, 's>
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