[][src]Trait meio::LiteTask

pub trait LiteTask: Sized + Send + 'static {
#[must_use]    fn routine<'async_trait>(
        self,
        signal: ShutdownReceiver
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; fn name(&self) -> String { ... }
fn start<T>(self, supervisor: Option<T>) -> Controller
    where
        T: Into<Controller> + Send
, { ... } }

Minimalistic actor that hasn't Address.

Required methods

#[must_use]fn routine<'async_trait>(
    self,
    signal: ShutdownReceiver
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    Self: 'async_trait, 

Routine of the task that can contain loops. It can taks into accout provided receiver to implement graceful interruption.

Loading content...

Provided methods

fn name(&self) -> String

Returns unique name of the LiteTask. Uses Uuid by default.

fn start<T>(self, supervisor: Option<T>) -> Controller where
    T: Into<Controller> + Send

Starts a lite task.

Loading content...

Implementors

Loading content...