pub struct UiDrain<T> {
pub messages: Vec<T>,
pub remaining: bool,
}Expand description
Result of one bounded generic-mailbox drain.
remaining means at least one message was prefetched beyond the requested
limit and another host wake was requested. An empty messages vector is a
normal result when the queue is currently empty or disconnected.
§Examples
use ailloli_ui_runtime::app::UiDrain;
let drain = UiDrain { messages: vec![1, 2], remaining: true };
assert_eq!(drain.messages.len(), 2);Fields§
§messages: Vec<T>Delivered messages in FIFO order, up to the requested limit.
remaining: boolWhether a prefetched message remains pending in the inbox.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for UiDrain<T>
impl<T> RefUnwindSafe for UiDrain<T>where
T: RefUnwindSafe,
impl<T> Send for UiDrain<T>where
T: Send,
impl<T> Sync for UiDrain<T>where
T: Sync,
impl<T> Unpin for UiDrain<T>where
T: Unpin,
impl<T> UnwindSafe for UiDrain<T>where
T: UnwindSafe,
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