Trait hannibal::LocalService
source · [−]pub trait LocalService: Actor + Default {
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.