Trait gc_sequence::Sequence [−][src]
pub trait Sequence<'gc>: Collect { type Output; fn step(&mut self, mc: MutationContext<'gc, '_>) -> Option<Self::Output>; }
A trait that describes a sequence of actions to perform, in between which garbage collection may take place.
This trait is similar to the Future
trait in that it is not designed to be used directly, but
rather chained together using combinators and run to completion with a sequencer.
Associated Types
Loading content...Required methods
fn step(&mut self, mc: MutationContext<'gc, '_>) -> Option<Self::Output>
[src]
Implementations on Foreign Types
Loading content...Implementors
impl<'gc, C, F, R> Sequence<'gc> for SequenceFnWith<C, F> where
F: 'static + FnOnce(MutationContext<'gc, '_>, C) -> R,
C: Collect,
[src]
impl<'gc, C, F, R> Sequence<'gc> for SequenceFnWith<C, F> where
F: 'static + FnOnce(MutationContext<'gc, '_>, C) -> R,
C: Collect,
[src]impl<'gc, F, R> Sequence<'gc> for SequenceFn<F> where
F: 'static + FnOnce(MutationContext<'gc, '_>) -> R,
[src]
impl<'gc, F, R> Sequence<'gc> for SequenceFn<F> where
F: 'static + FnOnce(MutationContext<'gc, '_>) -> R,
[src]impl<'gc, O: Collect> Sequence<'gc> for Done<O>
[src]
impl<'gc, O: Collect> Sequence<'gc> for Done<O>
[src]type Output = O
fn step(&mut self, _: MutationContext<'gc, '_>) -> Option<O>
[src]
impl<'gc, S> Sequence<'gc> for Flatten<'gc, S> where
S: Sequence<'gc>,
S::Output: Sequence<'gc>,
[src]
impl<'gc, S> Sequence<'gc> for Flatten<'gc, S> where
S: Sequence<'gc>,
S::Output: Sequence<'gc>,
[src]impl<'gc, S, C, F, I, E, R> Sequence<'gc> for AndThenWith<S, C, F, I> where
S: Sequence<'gc, Output = Result<I, E>>,
C: Collect,
I: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, C, I) -> Result<R, E>,
[src]
impl<'gc, S, C, F, I, E, R> Sequence<'gc> for AndThenWith<S, C, F, I> where
S: Sequence<'gc, Output = Result<I, E>>,
C: Collect,
I: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, C, I) -> Result<R, E>,
[src]impl<'gc, S, C, F, I, E, R> Sequence<'gc> for MapOkWith<S, C, F> where
S: Sequence<'gc, Output = Result<I, E>>,
C: Collect,
F: 'static + FnOnce(C, I) -> R,
[src]
impl<'gc, S, C, F, I, E, R> Sequence<'gc> for MapOkWith<S, C, F> where
S: Sequence<'gc, Output = Result<I, E>>,
C: Collect,
F: 'static + FnOnce(C, I) -> R,
[src]impl<'gc, S, C, F, R> Sequence<'gc> for ThenWith<'gc, S, C, F> where
S: Sequence<'gc>,
S::Output: Collect,
C: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, C, S::Output) -> R,
[src]
impl<'gc, S, C, F, R> Sequence<'gc> for ThenWith<'gc, S, C, F> where
S: Sequence<'gc>,
S::Output: Collect,
C: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, C, S::Output) -> R,
[src]type Output = R
fn step(&mut self, mc: MutationContext<'gc, '_>) -> Option<R>
[src]
impl<'gc, S, C, F, R> Sequence<'gc> for MapWith<S, C, F> where
S: Sequence<'gc>,
C: Collect,
F: 'static + FnOnce(C, S::Output) -> R,
[src]
impl<'gc, S, C, F, R> Sequence<'gc> for MapWith<S, C, F> where
S: Sequence<'gc>,
C: Collect,
F: 'static + FnOnce(C, S::Output) -> R,
[src]impl<'gc, S, F, I, E, R> Sequence<'gc> for AndThen<S, F, I> where
S: Sequence<'gc, Output = Result<I, E>>,
I: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, I) -> Result<R, E>,
[src]
impl<'gc, S, F, I, E, R> Sequence<'gc> for AndThen<S, F, I> where
S: Sequence<'gc, Output = Result<I, E>>,
I: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, I) -> Result<R, E>,
[src]impl<'gc, S, F, I, E, R> Sequence<'gc> for MapError<S, F> where
S: Sequence<'gc, Output = Result<I, E>>,
F: 'static + FnOnce(E) -> R,
[src]
impl<'gc, S, F, I, E, R> Sequence<'gc> for MapError<S, F> where
S: Sequence<'gc, Output = Result<I, E>>,
F: 'static + FnOnce(E) -> R,
[src]impl<'gc, S, F, I, E, R> Sequence<'gc> for MapOk<S, F> where
S: Sequence<'gc, Output = Result<I, E>>,
F: 'static + FnOnce(I) -> R,
[src]
impl<'gc, S, F, I, E, R> Sequence<'gc> for MapOk<S, F> where
S: Sequence<'gc, Output = Result<I, E>>,
F: 'static + FnOnce(I) -> R,
[src]impl<'gc, S, F, R> Sequence<'gc> for Then<'gc, S, F> where
S: Sequence<'gc>,
S::Output: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, S::Output) -> R,
[src]
impl<'gc, S, F, R> Sequence<'gc> for Then<'gc, S, F> where
S: Sequence<'gc>,
S::Output: Collect,
F: 'static + FnOnce(MutationContext<'gc, '_>, S::Output) -> R,
[src]