Skip to main content

ActorEntity

Trait ActorEntity 

Source
pub trait ActorEntity<M>: Send + 'static {
    // Required method
    fn spawn(self: Box<Self>) -> ActorEntitySpawnFuture<M>;
}
Expand description

Spawnable actor entity created by an EntityContext factory.

This is the actor-native registration seam corresponding to Akka’s EntityContext<M> => Behavior<M> shape. The returned ActorEntityHandle supplies the typed ingress used by the shard and the lifecycle controls used for passivation and handoff.

Required Methods§

Source

fn spawn(self: Box<Self>) -> ActorEntitySpawnFuture<M>

Spawn the entity actor and return its typed ingress.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<M, F, Fut> ActorEntity<M> for F
where M: 'static, F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = ShardingResult<ActorEntityHandle<M>>> + Send + 'static,