pub struct MailboxFactory;
Expand description
This struct is used as a factory for Mailboxes.
Implementations§
Source§impl MailboxFactory
impl MailboxFactory
Sourcepub fn memory_less() -> MemoryLessMailbox
pub fn memory_less() -> MemoryLessMailbox
Creates a new MemoryLessMailbox with a memory less message processing policy. For each neighbouring message, only the last one received is kept. This policy, from the user’s viewpoint, acts similarly to the [MostRecent] version, but it is more memory efficient since the other messages received are substituted with the last received.
Sourcepub fn most_recent() -> TimeOrderedMailbox
pub fn most_recent() -> TimeOrderedMailbox
Creates a new TimeOrderedMailbox with a most recent message processing policy. Keeps every message received from each neighbor, but returns only the most recent one. Used for processing in a LIFO order.
Sourcepub fn least_recent() -> TimeOrderedMailbox
pub fn least_recent() -> TimeOrderedMailbox
Creates a new TimeOrderedMailbox with a least recent message processing policy. Keeps every message received from each neighbor, but returns only the least recent one. Used for processing in a FIFO order.