pub struct ActorRef<Msg, Command = Infallible> { /* private fields */ }Implementations§
Source§impl<Msg, Command> ActorRef<Msg, Command>
impl<Msg, Command> ActorRef<Msg, Command>
pub fn new(inner: UnboundedSender<ActorMsg<Msg, Command>>) -> Self
pub fn try_send<M>(
&self,
msg: M,
) -> Result<(), SendError<ActorMsg<Msg, Command>>>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_command<Resp>( &self, msg: Command, ) -> Result<(), SendError<ActorMsg<Msg, Command>>>
pub fn command<IntoCommand>(&self, command: IntoCommand)where
Command: From<IntoCommand>,
pub fn downgrade(&self) -> WeakActorRef<Msg, Command>
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, Command> Freeze for ActorRef<Msg, Command>
impl<Msg, Command> RefUnwindSafe for ActorRef<Msg, Command>
impl<Msg, Command> Send for ActorRef<Msg, Command>
impl<Msg, Command> Sync for ActorRef<Msg, Command>
impl<Msg, Command> Unpin for ActorRef<Msg, Command>
impl<Msg, Command> UnwindSafe for ActorRef<Msg, Command>
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