pub struct WeakActorRef<A: Actor> { /* private fields */ }
Expand description
A reference to an actor that allows messages to be sent to the actor.
If the actor has been dropped, this WeakActorRef
will not be able to send messages to the actor,
and will not be able to be upgraded.
Implementations§
Source§impl<A: Actor> WeakActorRef<A>
impl<A: Actor> WeakActorRef<A>
Sourcepub fn upgrade(&self) -> Option<ActorRef<A>>
pub fn upgrade(&self) -> Option<ActorRef<A>>
Attempts to upgrade this WeakActorRef
to an ActorRef
. If the actor has been dropped,
this will return None
.
Trait Implementations§
Source§impl<A: Actor> Clone for WeakActorRef<A>
impl<A: Actor> Clone for WeakActorRef<A>
Auto Trait Implementations§
impl<A> Freeze for WeakActorRef<A>
impl<A> !RefUnwindSafe for WeakActorRef<A>
impl<A> Send for WeakActorRef<A>
impl<A> Sync for WeakActorRef<A>
impl<A> Unpin for WeakActorRef<A>
impl<A> !UnwindSafe for WeakActorRef<A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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