pub struct Inbox<T> { /* private fields */ }Expand description
Implementations§
Source§impl<T> Inbox<T>
impl<T> Inbox<T>
Sourcepub fn push(&self, now: u64, expires_at: u64, item: T)
pub fn push(&self, now: u64, expires_at: u64, item: T)
Push an item with a computed expiry timestamp.
expires_at should be message.created_at + message.ttl.
Pass expires_at = 0 for items that never expire.
Used by endpoint implementations and for local in-process delivery (e.g. world routing a message directly to an object/room inbox).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Inbox<T>
impl<T> RefUnwindSafe for Inbox<T>
impl<T> Send for Inbox<T>where
T: Send,
impl<T> Sync for Inbox<T>where
T: Send,
impl<T> Unpin for Inbox<T>
impl<T> UnsafeUnpin for Inbox<T>
impl<T> UnwindSafe for Inbox<T>
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