Trait aspect::OnResultMut[][src]

pub trait OnResultMut<R>: Enter {
    fn on_result(&self, enter: Self::E, _result: &mut R) -> Advice { ... }
fn leave_scope(&self, _enter: Self::E) -> Advice { ... } }

The OnResult trait is implemented on Aspects to get notified when an expression has returned, and provide the possibility to alter the result.

Provided methods

fn on_result(&self, enter: Self::E, _result: &mut R) -> Advice[src]

Called when an expression has returned.

This function is passed both the enter return value, and the expression return value.

fn leave_scope(&self, _enter: Self::E) -> Advice[src]

Called when an expression has exited, but the return value isn’t known. This can happen because of a panic, or if control flow bypasses a macro. This is also called by the default implementation of on_result.

Loading content...

Implementors

impl<R, A: OnResult<R>> OnResultMut<R> for A[src]

Loading content...