Skip to main content

ServiceRunner

Trait ServiceRunner 

Source
pub trait ServiceRunner<S: ServiceSpec>: Send + 'static {
    // Required methods
    fn on_command(
        &mut self,
        command: S::Command,
        ctx: ServiceCtx<S>,
    ) -> BoxFuture<Result<S::CommandOk, S::CommandErr>>;
    fn on_stop(self: Box<Self>, ctx: ServiceCtx<S>) -> BoxFuture<()>;
}

Required Methods§

Source

fn on_command( &mut self, command: S::Command, ctx: ServiceCtx<S>, ) -> BoxFuture<Result<S::CommandOk, S::CommandErr>>

Source

fn on_stop(self: Box<Self>, ctx: ServiceCtx<S>) -> BoxFuture<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§