pub struct InputQueue { /* private fields */ }Expand description
A clonable handle to one session’s pending mid-run input.
Clones share one queue. Cheap to clone and safe to hold across an await — the lock is only ever taken inside these methods, never returned.
Implementations§
Source§impl InputQueue
impl InputQueue
Sourcepub fn pending(&self) -> Vec<String>
pub fn pending(&self) -> Vec<String>
The pending items, for a frontend to render. Does not consume.
Sourcepub fn clear(&self)
pub fn clear(&self)
Drop every pending item.
Called on cancel: the message was written for a run the user then
abandoned, so delivering it into the next turn would be surprising. This
covers undelivered items only — anything already drained is in
history and cancel rolls nothing back (ADR-0028).
Trait Implementations§
Source§impl Clone for InputQueue
impl Clone for InputQueue
Source§fn clone(&self) -> InputQueue
fn clone(&self) -> InputQueue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputQueue
impl Debug for InputQueue
Source§impl Default for InputQueue
impl Default for InputQueue
Source§fn default() -> InputQueue
fn default() -> InputQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InputQueue
impl RefUnwindSafe for InputQueue
impl Send for InputQueue
impl Sync for InputQueue
impl Unpin for InputQueue
impl UnsafeUnpin for InputQueue
impl UnwindSafe for InputQueue
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