Skip to main content

ProcSpawnerEndpoint

Trait ProcSpawnerEndpoint 

Source
pub trait ProcSpawnerEndpoint {
    // Provided methods
    fn spawn_proc(&self, cx: &impl Actor) -> Result<ActorRef<SpawnActor>>
       where Self: Clone + Send + 'static,
             for<'a> &'a Self: Endpoint<SpawnProcMessage> { ... }
    fn spawn_proc_uid(
        &self,
        cx: &impl Actor,
        uid: Uid,
    ) -> Result<ActorRef<SpawnActor>>
       where Self: Clone + Send + 'static,
             for<'a> &'a Self: Endpoint<SpawnProcMessage> { ... }
    fn spawn_proc_uid_with_ready(
        &self,
        cx: &impl Actor,
        uid: Uid,
        ready: OncePortHandle<()>,
    ) -> Result<ActorRef<SpawnActor>>
       where Self: Clone + Send + 'static,
             for<'a> &'a Self: Endpoint<SpawnProcMessage> { ... }
    fn spawn_proc_uid_with_link(
        &self,
        cx: &impl Actor,
        uid: Uid,
        liveness: KeepaliveLink,
    ) -> Result<ActorRef<SpawnActor>>
       where Self: Clone + Send + 'static,
             for<'a> &'a Self: Endpoint<SpawnProcMessage> { ... }
    fn spawn_proc_uid_with_link_and_ready(
        &self,
        cx: &impl Actor,
        uid: Uid,
        liveness: KeepaliveLink,
        ready: Option<OncePortHandle<()>>,
    ) -> Result<ActorRef<SpawnActor>>
       where Self: Clone + Send + 'static,
             for<'a> &'a Self: Endpoint<SpawnProcMessage> { ... }
}
Expand description

Convenience methods for endpoints that accept SpawnProc requests.

Provided Methods§

Source

fn spawn_proc(&self, cx: &impl Actor) -> Result<ActorRef<SpawnActor>>
where Self: Clone + Send + 'static, for<'a> &'a Self: Endpoint<SpawnProcMessage>,

Spawn a proc with a fresh proc uid.

Source

fn spawn_proc_uid( &self, cx: &impl Actor, uid: Uid, ) -> Result<ActorRef<SpawnActor>>
where Self: Clone + Send + 'static, for<'a> &'a Self: Endpoint<SpawnProcMessage>,

Spawn a proc with an explicit proc uid.

Source

fn spawn_proc_uid_with_ready( &self, cx: &impl Actor, uid: Uid, ready: OncePortHandle<()>, ) -> Result<ActorRef<SpawnActor>>
where Self: Clone + Send + 'static, for<'a> &'a Self: Endpoint<SpawnProcMessage>,

Spawn a proc and report when it becomes reachable.

The returned ActorRef names the proc’s actor-spawn endpoint, but the proc has to launch and join before that endpoint can route — messages sent earlier are dropped. A bare readiness signal is posted to ready once the proc has joined, so callers that need to use the endpoint can wait for that signal instead of guessing with a delay. The endpoint address is already known from the synchronously returned ActorRef, so ready carries no payload.

Spawn a proc with an explicit proc uid and liveness link.

Spawn a proc with an explicit proc uid, liveness link, and optional readiness port. This is the general form behind the other spawn_proc* methods; see spawn_proc_uid_with_ready for the readiness semantics.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> ProcSpawnerEndpoint for T
where for<'a> &'a T: Endpoint<SpawnProc>,