Struct tonari_actor::Addr
source · [−]Implementations
Methods from Deref<Target = Recipient<M>>
sourcepub fn recipient<N: Into<M>>(&self) -> Recipient<N>
pub fn recipient<N: Into<M>>(&self) -> Recipient<N>
Convert a Recipient<M>
(or Addr<A>
through Deref
, where A::Message = M
) into
Recipient<N>
, where message N
can be converted into M
.
In case of converting from Addr
, this erases the type of the actor and only preserves
type of the message, allowing you to make actors more independent of each other.
Trait Implementations
Auto Trait Implementations
impl<A> !RefUnwindSafe for Addr<A>
impl<A: ?Sized> Send for Addr<A>
impl<A: ?Sized> Sync for Addr<A>
impl<A: ?Sized> Unpin for Addr<A>
impl<A> !UnwindSafe for Addr<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