pub struct ClientActor(/* private fields */);Implementations§
Source§impl ClientActor
impl ClientActor
Methods from Deref<Target = Addr<Client>>§
Sourcepub fn do_send<M>(&self, msg: M)
pub fn do_send<M>(&self, msg: M)
Sends a message unconditionally, ignoring any potential errors.
The message is always queued, even if the mailbox for the receiver is full. If the mailbox is closed, the message is silently dropped.
Sourcepub fn try_send<M>(&self, msg: M) -> Result<(), SendError<M>>
pub fn try_send<M>(&self, msg: M) -> Result<(), SendError<M>>
Tries to send a message.
This method fails if actor’s mailbox is full or closed. This method registers the current task in the receiver’s queue.
Sourcepub fn send<M>(&self, msg: M) -> MsgRequest<AddressSender<A>, M>
pub fn send<M>(&self, msg: M) -> MsgRequest<AddressSender<A>, M>
Sends an asynchronous message and waits for a response.
The communication channel to the actor is bounded. If the returned request future gets dropped, the message is cancelled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientActor
impl !RefUnwindSafe for ClientActor
impl Send for ClientActor
impl Sync for ClientActor
impl Unpin for ClientActor
impl !UnwindSafe for ClientActor
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