pub trait ActorManager {
type Config;
type Handle;
// Required methods
fn start<'async_trait>(
config: Self::Config,
) -> Pin<Box<dyn Future<Output = ActorSystemResult<Self::Handle>> + Send + 'async_trait>>
where Self: 'async_trait;
fn stop<'async_trait>(
handle: Self::Handle,
) -> Pin<Box<dyn Future<Output = ActorSystemResult<()>> + Send + 'async_trait>>
where Self: 'async_trait;
fn health_check<'life0, 'async_trait>(
handle: &'life0 Self::Handle,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Actor管理器trait
定义了Actor的生命周期管理接口
Required Associated Types§
Required Methods§
Sourcefn start<'async_trait>(
config: Self::Config,
) -> Pin<Box<dyn Future<Output = ActorSystemResult<Self::Handle>> + Send + 'async_trait>>where
Self: 'async_trait,
fn start<'async_trait>(
config: Self::Config,
) -> Pin<Box<dyn Future<Output = ActorSystemResult<Self::Handle>> + Send + 'async_trait>>where
Self: 'async_trait,
启动Actor
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".