pub trait ActorMesh: Mesh<Id = ActorMeshId> {
type Actor: RemoteActor;
// Required methods
fn proc_mesh(&self) -> &ProcMesh;
fn name(&self) -> &str;
// Provided methods
fn cast<M>(
&self,
sender: &impl CanSend,
selection: Selection,
message: M,
) -> Result<(), CastError>
where Self::Actor: RemoteHandles<IndexedErasedUnbound<M>>,
M: Castable + RemoteMessage { ... }
fn world_id(&self) -> &WorldId { ... }
fn iter_actor_refs(&self) -> impl Iterator<Item = ActorRef<Self::Actor>> { ... }
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn bind(&self) -> ActorMeshRef<Self::Actor> { ... }
}
Expand description
A mesh of actors, all of which reside on the same ProcMesh
.
Required Associated Types§
Sourcetype Actor: RemoteActor
type Actor: RemoteActor
The type of actor in the mesh.
Required Methods§
Provided Methods§
Sourcefn cast<M>(
&self,
sender: &impl CanSend,
selection: Selection,
message: M,
) -> Result<(), CastError>
fn cast<M>( &self, sender: &impl CanSend, selection: Selection, message: M, ) -> Result<(), CastError>
Cast an M
-typed message to the ranks selected by sel
in
this ActorMesh.
fn world_id(&self) -> &WorldId
Sourcefn iter_actor_refs(&self) -> impl Iterator<Item = ActorRef<Self::Actor>>
fn iter_actor_refs(&self) -> impl Iterator<Item = ActorRef<Self::Actor>>
Iterate over all ActorRef<Self::Actor>
in this mesh.
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn bind(&self) -> ActorMeshRef<Self::Actor>
fn bind(&self) -> ActorMeshRef<Self::Actor>
Get a serializeable reference to this mesh similar to ActorHandle::bind
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.