Skip to main content

Dispatcher

Trait Dispatcher 

Source
pub trait Dispatcher {
    // Required method
    fn run(
        &self,
        unit: &Unit,
        ctx: &DispatchCtx,
    ) -> Result<Box<dyn Session>, LoopError>;
}
Expand description

Launches sessions for units. Stateless with respect to the walk loop; any per-dispatch state is internal to the impl.

Required Methods§

Source

fn run( &self, unit: &Unit, ctx: &DispatchCtx, ) -> Result<Box<dyn Session>, LoopError>

Launch a session for the given unit in the given walk context.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§