Trait ObserversTuple

Source
pub trait ObserversTuple<I, S>: MatchName {
    // Required methods
    fn pre_exec_all(&mut self, state: &mut S, input: &I) -> Result<(), Error>;
    fn post_exec_all(
        &mut self,
        state: &mut S,
        input: &I,
        exit_kind: &ExitKind,
    ) -> Result<(), Error>;
    fn pre_exec_child_all(
        &mut self,
        state: &mut S,
        input: &I,
    ) -> Result<(), Error>;
    fn post_exec_child_all(
        &mut self,
        state: &mut S,
        input: &I,
        exit_kind: &ExitKind,
    ) -> Result<(), Error>;
}
Expand description

A haskell-style tuple of observers

Required Methods§

Source

fn pre_exec_all(&mut self, state: &mut S, input: &I) -> Result<(), Error>

This is called right before the next execution.

Source

fn post_exec_all( &mut self, state: &mut S, input: &I, exit_kind: &ExitKind, ) -> Result<(), Error>

This is called right after the last execution

Source

fn pre_exec_child_all(&mut self, state: &mut S, input: &I) -> Result<(), Error>

This is called right before the next execution in the child process, if any.

Source

fn post_exec_child_all( &mut self, state: &mut S, input: &I, exit_kind: &ExitKind, ) -> Result<(), Error>

This is called right after the last execution in the child process, if any.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Head, Tail, I, S> ObserversTuple<I, S> for (Head, Tail)
where Head: Observer<I, S>, Tail: ObserversTuple<I, S>,

Source§

fn pre_exec_all(&mut self, state: &mut S, input: &I) -> Result<(), Error>

Source§

fn post_exec_all( &mut self, state: &mut S, input: &I, exit_kind: &ExitKind, ) -> Result<(), Error>

Source§

fn pre_exec_child_all(&mut self, state: &mut S, input: &I) -> Result<(), Error>

Source§

fn post_exec_child_all( &mut self, state: &mut S, input: &I, exit_kind: &ExitKind, ) -> Result<(), Error>

Source§

impl<I, S> ObserversTuple<I, S> for ()

Source§

fn pre_exec_all(&mut self, _state: &mut S, _input: &I) -> Result<(), Error>

Source§

fn post_exec_all( &mut self, _state: &mut S, _input: &I, _exit_kind: &ExitKind, ) -> Result<(), Error>

Source§

fn pre_exec_child_all( &mut self, _state: &mut S, _input: &I, ) -> Result<(), Error>

Source§

fn post_exec_child_all( &mut self, _state: &mut S, _input: &I, _exit_kind: &ExitKind, ) -> Result<(), Error>

Implementors§

Source§

impl<A, B, DOT, I, S> ObserversTuple<I, S> for ProxyObserversTuple<A, B, DOT>
where A: MatchName, B: MatchName, DOT: DifferentialObserversTuple<A, B, I, S> + MatchName,