pub trait ObserversTuple<S>: MatchName + Debugwhere
    S: UsesInput,
{ fn pre_exec_all(
        &mut self,
        state: &mut S,
        input: &S::Input
    ) -> Result<(), Error>; fn post_exec_all(
        &mut self,
        state: &mut S,
        input: &S::Input,
        exit_kind: &ExitKind
    ) -> Result<(), Error>; fn pre_exec_child_all(
        &mut self,
        state: &mut S,
        input: &S::Input
    ) -> Result<(), Error>; fn post_exec_child_all(
        &mut self,
        state: &mut S,
        input: &S::Input,
        exit_kind: &ExitKind
    ) -> Result<(), Error>; fn observes_stdout(&self) -> bool; fn observes_stderr(&self) -> bool; fn observe_stdout(&mut self, stdout: &[u8]); fn observe_stderr(&mut self, stderr: &[u8]); }
Expand description

A haskell-style tuple of observers

Required Methods§

source

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

This is called right before the next execution.

source

fn post_exec_all(
    &mut self,
    state: &mut S,
    input: &S::Input,
    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: &S::Input
) -> 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: &S::Input,
    exit_kind: &ExitKind
) -> Result<(), Error>

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

source

fn observes_stdout(&self) -> bool

Returns true if a stdout observer was added to the list

source

fn observes_stderr(&self) -> bool

Returns true if a stderr observer was added to the list

source

fn observe_stdout(&mut self, stdout: &[u8])

Runs observe_stdout for all stdout observers in the list

source

fn observe_stderr(&mut self, stderr: &[u8])

Runs observe_stderr for all stderr observers in the list

Implementations on Foreign Types§

source§

impl<S> ObserversTuple<S> for ()where
    S: UsesInput,

source§

fn observes_stdout(&self) -> bool

Returns true if a stdout observer was added to the list

source§

fn observes_stderr(&self) -> bool

Returns true if a stderr observer was added to the list

source§

fn observe_stdout(&mut self, stdout: &[u8])

Runs observe_stdout for all stdout observers in the list

source§

fn observe_stderr(&mut self, stderr: &[u8])

Runs observe_stderr for all stderr observers in the list

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn observes_stdout(&self) -> bool

Returns true if a stdout observer was added to the list

source§

fn observes_stderr(&self) -> bool

Returns true if a stderr observer was added to the list

source§

fn observe_stdout(&mut self, stdout: &[u8])

Runs observe_stdout for all stdout observers in the list

source§

fn observe_stderr(&mut self, stderr: &[u8])

Runs observe_stderr for all stderr observers in the list

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

impl<A, B, DOT, S> ObserversTuple<S> for ProxyObserversTuple<A, B, DOT>where
    A: ObserversTuple<S>,
    B: ObserversTuple<S>,
    DOT: DifferentialObserversTuple<A, B, S>,
    S: UsesInput,