pub struct Queue { /* private fields */ }Implementations§
Source§impl Queue
impl Queue
pub fn new() -> Self
pub fn next_id(&mut self) -> u64
Sourcepub fn submit(&mut self, u: Utterance, policy: Policy) -> Vec<u64>
pub fn submit(&mut self, u: Utterance, policy: Policy) -> Vec<u64>
Apply policy and add u. Returns the ids of any pending utterances
dropped as a result; the caller is responsible for the current one.
pub fn pop_front(&mut self) -> Option<Utterance>
pub fn clear(&mut self) -> Vec<u64>
pub fn cancel(&mut self, id: u64) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &Utterance>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Queue
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnsafeUnpin for Queue
impl UnwindSafe for Queue
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