pub trait LocalService: Actor + Default {
// Provided method
fn from_registry<'async_trait>( ) -> Pin<Box<dyn Future<Output = Result<Addr<Self>>> + Send + 'async_trait>>
where Self: Send + 'async_trait { ... }
}Expand description
Trait define a local service.
The service is a thread local actor.
You can use Actor::from_registry to get the address Addr<A> of the service.
Provided Methods§
fn from_registry<'async_trait>() -> Pin<Box<dyn Future<Output = Result<Addr<Self>>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
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.