Trait RemotableActor

Source
pub trait RemotableActor: Actor
where Self::Params: RemoteMessage,
{ // Required method fn gspawn( proc: &Proc, name: &str, serialized_params: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<ActorId, Error>> + Send>>; // Provided method fn get_type_id() -> TypeId { ... } }
Expand description

A RemotableActor may be spawned remotely, and receive messages across process boundaries.

Required Methods§

Source

fn gspawn( proc: &Proc, name: &str, serialized_params: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<ActorId, Error>> + Send>>

A type-erased entry point to spawn this actor. This is primarily used by Hyperactor’s remote actor registration mechanism.

Provided Methods§

Source

fn get_type_id() -> TypeId

The type ID of this actor.

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.

Implementors§

Source§

impl<A> RemotableActor for A
where A: Actor + RemoteActor + Binds<A>, <A as Actor>::Params: RemoteMessage,