Trait Chainable

Source
pub trait Chainable<E: ErrorType>: BehaviourFunction<E> + Sized {
    // Required method
    fn then<S: BehaviourFunction<E> + 'static>(
        self,
        followed_by: S,
    ) -> Box<dyn BehaviourFunction<E>>;
}
Expand description

Enables chaining of BehaviourFunctions.

Required Methods§

Source

fn then<S: BehaviourFunction<E> + 'static>( self, followed_by: S, ) -> Box<dyn BehaviourFunction<E>>

Constructs a new BehaviourFunction which will first execute self, and then followed_by.

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.

Implementors§

Source§

impl<E: ErrorType, T: BehaviourFunction<E> + 'static> Chainable<E> for T