pub struct MessageQueue<'a> { /* private fields */ }Expand description
Mutable scoped view of messages retained until their delivery boundary.
Implementations§
Source§impl<'a> MessageQueue<'a>
impl<'a> MessageQueue<'a>
Sourcepub fn latest(&self) -> Option<QueuedMessageView<'_>>
pub fn latest(&self) -> Option<QueuedMessageView<'_>>
Returns the newest message available to this context.
Sourcepub fn find(&self, id: &str) -> Option<QueuedMessageView<'_>>
pub fn find(&self, id: &str) -> Option<QueuedMessageView<'_>>
Returns one owned item by its revision identity.
Sourcepub fn enqueue(
&mut self,
id: &str,
boundary: QueuedMessageBoundary,
event: MessageEvent,
) -> Result<bool>
pub fn enqueue( &mut self, id: &str, boundary: QueuedMessageBoundary, event: MessageEvent, ) -> Result<bool>
Appends one prepared message, or returns false when it is full or duplicated.
Auto Trait Implementations§
impl<'a> !UnwindSafe for MessageQueue<'a>
impl<'a> Freeze for MessageQueue<'a>
impl<'a> RefUnwindSafe for MessageQueue<'a>
impl<'a> Send for MessageQueue<'a>
impl<'a> Sync for MessageQueue<'a>
impl<'a> Unpin for MessageQueue<'a>
impl<'a> UnsafeUnpin for MessageQueue<'a>
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