Skip to main content

CustomSystemService

Trait CustomSystemService 

Source
pub trait CustomSystemService: Actor<Context = Context<Self>> + SystemService {
    // Provided methods
    fn start_service_with(
        f: impl Fn() -> Self + Sync + 'static + Send,
    ) -> Addr<Self> { ... }
    fn custom_service_started(&mut self, ctx: &mut Context<Self>) { ... }
    fn add_to_registry(addr: Addr<Self>) -> Addr<Self> { ... }
    fn from_custom_registry() -> Addr<Self> { ... }
}
Expand description

Trait defines custom system’s service.

Provided Methods§

Source

fn start_service_with( f: impl Fn() -> Self + Sync + 'static + Send, ) -> Addr<Self>

Construct and start system service with arguments

Source

fn custom_service_started(&mut self, ctx: &mut Context<Self>)

Source

fn add_to_registry(addr: Addr<Self>) -> Addr<Self>

Source

fn from_custom_registry() -> Addr<Self>

Get actor’s address from system registry

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§