pub trait Actor: Mailbox {
type A: Actor;
// Required method
fn instance(&self) -> &Instance<Self::A>;
// Provided methods
fn spawn<C: Actor>(&self, actor: C) -> ActorHandle<C>
where Self: Sized { ... }
fn spawn_with_label<C: Actor>(
&self,
label: &str,
actor: C,
) -> ActorHandle<C>
where Self: Sized { ... }
fn spawn_with_uid<C: Actor>(
&self,
uid: Uid,
actor: C,
) -> Result<ActorHandle<C>>
where Self: Sized { ... }
fn headers(&self) -> &Flattrs { ... }
}Expand description
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn spawn<C: Actor>(&self, actor: C) -> ActorHandle<C>where
Self: Sized,
fn spawn<C: Actor>(&self, actor: C) -> ActorHandle<C>where
Self: Sized,
Spawn a child actor under this actor context.
Sourcefn spawn_with_label<C: Actor>(&self, label: &str, actor: C) -> ActorHandle<C>where
Self: Sized,
fn spawn_with_label<C: Actor>(&self, label: &str, actor: C) -> ActorHandle<C>where
Self: Sized,
Spawn a child actor with a fresh uid carrying a display label.
Sourcefn spawn_with_uid<C: Actor>(&self, uid: Uid, actor: C) -> Result<ActorHandle<C>>where
Self: Sized,
fn spawn_with_uid<C: Actor>(&self, uid: Uid, actor: C) -> Result<ActorHandle<C>>where
Self: Sized,
Spawn a child actor using an explicit uid.