Service

Trait Service 

Source
pub trait Service {
    type Context;
    type Error;

    // Provided methods
    async fn started(&mut self, _cx: &Self::Context) -> Result<(), Self::Error> { ... }
    async fn stopping(&mut self, _cx: &Self::Context) -> Result<(), Self::Error> { ... }
}
Expand description

This trait is a marker trait for any actor, setting the context and error types.

Required Associated Types§

Provided Methods§

Source

async fn started(&mut self, _cx: &Self::Context) -> Result<(), Self::Error>

Source

async fn stopping(&mut self, _cx: &Self::Context) -> Result<(), Self::Error>

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§