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§
Sourcefn start_service_with(
f: impl Fn() -> Self + Sync + 'static + Send,
) -> Addr<Self>
fn start_service_with( f: impl Fn() -> Self + Sync + 'static + Send, ) -> Addr<Self>
Construct and start system service with arguments
fn custom_service_started(&mut self, ctx: &mut Context<Self>)
fn add_to_registry(addr: Addr<Self>) -> Addr<Self>
Sourcefn from_custom_registry() -> Addr<Self>
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", so this trait is not object safe.