pub struct ActorMailbox {
pub id: ActorId,
pub total_received: u64,
pub total_processed: u64,
/* private fields */
}Expand description
An actor mailbox (a queue of messages).
Fields§
§id: ActorIdThe actor’s ID.
total_received: u64Total messages received.
total_processed: u64Total messages processed.
Implementations§
Source§impl ActorMailbox
impl ActorMailbox
Sourcepub fn send(&mut self, msg: ActorMessage)
pub fn send(&mut self, msg: ActorMessage)
Enqueue a message.
Sourcepub fn receive(&mut self) -> Option<ActorMessage>
pub fn receive(&mut self) -> Option<ActorMessage>
Dequeue the next message.
Auto Trait Implementations§
impl Freeze for ActorMailbox
impl RefUnwindSafe for ActorMailbox
impl Send for ActorMailbox
impl Sync for ActorMailbox
impl Unpin for ActorMailbox
impl UnsafeUnpin for ActorMailbox
impl UnwindSafe for ActorMailbox
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