pub struct ProcMesh { /* private fields */ }
Expand description
A mesh of processes.
Implementations§
Methods from Deref<Target = ProcMeshRef>§
Sourcepub async fn status(&self, cx: &impl Actor) -> Result<ValueMesh<bool>>
pub async fn status(&self, cx: &impl Actor) -> Result<ValueMesh<bool>>
The current statuses of procs in this mesh.
Sourcepub async fn actor_states(
&self,
cx: &impl Actor,
name: Name,
) -> Result<ValueMesh<State<ActorState>>>
pub async fn actor_states( &self, cx: &impl Actor, name: Name, ) -> Result<ValueMesh<State<ActorState>>>
The supervision events of procs in this mesh.
Sourcepub async fn spawn<A: Actor + Referable>(
&self,
cx: &impl Actor,
name: &str,
params: &A::Params,
) -> Result<ActorMesh<A>>where
A::Params: RemoteMessage,
pub async fn spawn<A: Actor + Referable>(
&self,
cx: &impl Actor,
name: &str,
params: &A::Params,
) -> Result<ActorMesh<A>>where
A::Params: RemoteMessage,
Spawn an actor on all of the procs in this mesh, returning a new ActorMesh.
Bounds:
A: Actor
- the actor actually runs inside each proc.A: Referable
- so we can return typedActorRef<A>
s inside theActorMesh
.A::Params: RemoteMessage
- spawn parameters must be serializable and routable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcMesh
impl !RefUnwindSafe for ProcMesh
impl Send for ProcMesh
impl Sync for ProcMesh
impl Unpin for ProcMesh
impl !UnwindSafe for ProcMesh
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more