pub struct Mailbox { /* private fields */ }Expand description
spc_006-02: a task’s inbox — point-to-point only (no fan-out; that’s Channel’s job,
spc_006-04). Pure data structure: no TaskTable/Tcb reference, no send/receive wiring onto
a real task yet (spc_006-03).
Implementations§
Source§impl Mailbox
impl Mailbox
pub fn new() -> Self
pub fn send(&mut self, msg: MailboxMessage)
pub fn try_send( &mut self, msg: MailboxMessage, now: LogicalTime, ) -> IpcEnqueueOutcome
Sourcepub fn receive(&mut self) -> Option<MailboxMessage>
pub fn receive(&mut self) -> Option<MailboxMessage>
FIFO — oldest message first.
pub fn receive_at(&mut self, now: LogicalTime) -> Option<MailboxMessage>
pub fn snapshot(&self) -> Vec<MailboxMessage>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mailbox
impl<'de> Deserialize<'de> for Mailbox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Mailbox
impl StructuralPartialEq for Mailbox
Auto Trait Implementations§
impl Freeze for Mailbox
impl RefUnwindSafe for Mailbox
impl Send for Mailbox
impl Sync for Mailbox
impl Unpin for Mailbox
impl UnsafeUnpin for Mailbox
impl UnwindSafe for Mailbox
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