Skip to main content

Worker

Trait Worker 

Source
pub trait Worker {
    // Required methods
    fn run(
        &self,
    ) -> impl Future<Output = Result<JoinHandle<()>, OperationOutcomeError>>;
    fn stop(
        &mut self,
    ) -> impl Future<Output = Result<(), OperationOutcomeError>>;
}

Required Methods§

Source

fn run( &self, ) -> impl Future<Output = Result<JoinHandle<()>, OperationOutcomeError>>

Source

fn stop(&mut self) -> impl Future<Output = Result<(), OperationOutcomeError>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§