pub struct WeakAddr<A: Actor> { /* private fields */ }
Expand description
A weakly referenced counterpart to Addr<A>
.
Implementations
sourceimpl<A: Actor> WeakAddr<A>
impl<A: Actor> WeakAddr<A>
sourcepub fn upgrade(&self) -> Option<Addr<A>>
pub fn upgrade(&self) -> Option<Addr<A>>
Attempts to upgrade the WeakAddr<A>
pointer to an Addr<A>
.
Returns None
if the actor has since been dropped or the
underlying address is disconnected.
pub fn recipient<M: 'static>(self) -> WeakRecipient<M> where
A: Handler<M>,
A::Context: ToEnvelope<A, M>,
M: Message + Send,
M::Result: Send,
Trait Implementations
sourceimpl<A: Actor, M: Message + Send + 'static> From<WeakAddr<A>> for WeakRecipient<M> where
A: Handler<M>,
M::Result: Send,
A::Context: ToEnvelope<A, M>,
impl<A: Actor, M: Message + Send + 'static> From<WeakAddr<A>> for WeakRecipient<M> where
A: Handler<M>,
M::Result: Send,
A::Context: ToEnvelope<A, M>,
sourcefn from(addr: WeakAddr<A>) -> WeakRecipient<M>
fn from(addr: WeakAddr<A>) -> WeakRecipient<M>
Performs the conversion.
impl<A: Actor> Eq for WeakAddr<A>
Auto Trait Implementations
impl<A> !RefUnwindSafe for WeakAddr<A>
impl<A> Send for WeakAddr<A>
impl<A> Sync for WeakAddr<A>
impl<A> Unpin for WeakAddr<A>
impl<A> !UnwindSafe for WeakAddr<A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more