pub struct ActorRef<Msg, Shutdown = Infallible> { /* private fields */ }Implementations§
Source§impl<Msg, Shutdown> ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> ActorRef<Msg, Shutdown>
pub fn new(inner: UnboundedSender<ActorMsg<Msg, Shutdown>>) -> Self
pub fn try_send<M>(
&self,
msg: M,
) -> Result<(), SendError<ActorMsg<Msg, Shutdown>>>where
Msg: From<M>,
pub fn send<M>(&self, msg: M)where
Msg: From<M>,
pub fn ask<Resp>(&self) -> Receiver<Resp>
pub fn ask_or_default<Resp>(&self) -> PendingRespOrDefault<Resp> ⓘ
pub fn try_shutdown<Resp>( &self, msg: Shutdown, ) -> Result<(), SendError<ActorMsg<Msg, Shutdown>>>
pub fn shutdown<IntoShutdown>(&self, shutdown: IntoShutdown)where
Shutdown: From<IntoShutdown>,
pub fn downgrade(&self) -> WeakActorRef<Msg, Shutdown>
pub fn strong_count(&self) -> usize
pub fn weak_count(&self) -> usize
pub fn is_closed(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<Msg, Shutdown> Freeze for ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> RefUnwindSafe for ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> Send for ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> Sync for ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> Unpin for ActorRef<Msg, Shutdown>
impl<Msg, Shutdown> UnwindSafe for ActorRef<Msg, Shutdown>
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