pub struct AnyActorGuard { /* private fields */ }Expand description
A type-erased guard that stops an actor when dropped.
Implementations§
Source§impl AnyActorGuard
impl AnyActorGuard
Sourcepub fn into_inner(self) -> AnyActorHandle
pub fn into_inner(self) -> AnyActorHandle
Return the actor handle without stopping the actor.
Methods from Deref<Target = AnyActorHandle>§
Sourcepub fn drain_and_stop(&self, reason: &str) -> Result<(), ActorError>
pub fn drain_and_stop(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to drain its current messages and then stop.
Sourcepub fn stop(&self, reason: &str) -> Result<(), ActorError>
pub fn stop(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to stop without draining ordinary queued work first.
Sourcepub fn kill(&self, reason: &str) -> Result<(), ActorError>
pub fn kill(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to terminate immediately.
Sourcepub fn status(&self) -> Receiver<ActorStatus>
pub fn status(&self) -> Receiver<ActorStatus>
A watch that observes the lifecycle state of the actor.
Sourcepub fn downcast<A: Actor>(&self) -> Option<ActorHandle<A>>
pub fn downcast<A: Actor>(&self) -> Option<ActorHandle<A>>
Attempt to recover a typed actor handle.
Trait Implementations§
Source§impl Debug for AnyActorGuard
impl Debug for AnyActorGuard
Source§impl Deref for AnyActorGuard
impl Deref for AnyActorGuard
Auto Trait Implementations§
impl Freeze for AnyActorGuard
impl !RefUnwindSafe for AnyActorGuard
impl Send for AnyActorGuard
impl Sync for AnyActorGuard
impl Unpin for AnyActorGuard
impl UnsafeUnpin for AnyActorGuard
impl !UnwindSafe for AnyActorGuard
Blanket Implementations§
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>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].