Trait exec_rs::ModeCombiner[][src]

pub trait ModeCombiner<'m, T: 'm> {
    fn combine(
        &self,
        other: Box<dyn ModeCombiner<'m, T> + Send + Sync + 'm>
    ) -> Box<dyn ModeCombiner<'m, T> + Send + Sync + 'm>;
fn get_outer(&self) -> Option<&(dyn ModeCombiner<'m, T> + Send + Sync)>;
fn set_outer(
        &mut self,
        outer: Arc<dyn ModeCombiner<'m, T> + Send + Sync + 'm>
    );
fn iter<'a>(&'a self) -> ModeCombinerIterator<'a, 'm, T>

Notable traits for ModeCombinerIterator<'a, 'm, T>

impl<'a, 'm, T: 'm> Iterator for ModeCombinerIterator<'a, 'm, T> type Item = &'a dyn ModeCombiner<'m, T>;
;
fn wrapper_ref(&self) -> Arc<dyn ModeWrapper<'m, T> + Send + Sync + 'm>; }

Trait used to combine ModeWrappers by allowing one ModeWrapper to delegate to another ModeWrapper and providing an iterator that can unwrap combined ModeWrappers. An implementation of this trait is returned by ModeWrapper::into_combiner which returns a DelegatingModeCombiner by default.

Required methods

fn combine(
    &self,
    other: Box<dyn ModeCombiner<'m, T> + Send + Sync + 'm>
) -> Box<dyn ModeCombiner<'m, T> + Send + Sync + 'm>
[src]

Combine this ModeCombiner with the supplied boxed ModeCombiner.

The default implementation in DelegatingModeCombiner sets this ModeCombiner as the outer ModeCombiner of the supplied ModeCombiner so that the iterator walks the ModeCombiners in the reverse order of which they were added, meaning the ModeCombiner that was added first ends up wrapping the task last, meaning its task will be the outermost task.

fn get_outer(&self) -> Option<&(dyn ModeCombiner<'m, T> + Send + Sync)>[src]

Return the outer ModeCombiner this ModeCombiner delegates to, this is the next ModeCombiner the iterator returned by ModeCombiner::iter steps to.

fn set_outer(&mut self, outer: Arc<dyn ModeCombiner<'m, T> + Send + Sync + 'm>)[src]

Set the outer ModeCombiner this ModeCombiner delegates to, this is the next ModeCombiner the iterator returned by ModeCombiner::iter steps to.

fn iter<'a>(&'a self) -> ModeCombinerIterator<'a, 'm, T>

Notable traits for ModeCombinerIterator<'a, 'm, T>

impl<'a, 'm, T: 'm> Iterator for ModeCombinerIterator<'a, 'm, T> type Item = &'a dyn ModeCombiner<'m, T>;
[src]

Return an iterator that can unwrap combined ModeCombiners by stepping into the outer ModeCombiner recursively.

fn wrapper_ref(&self) -> Arc<dyn ModeWrapper<'m, T> + Send + Sync + 'm>[src]

Reference the source ModeWrapper. Used to wrap the task when applying a Mode.

Loading content...

Implementors

impl<'m, T> ModeCombiner<'m, T> for DelegatingModeCombiner<'m, T>[src]

Loading content...