pub struct CommandQueue { /* private fields */ }Expand description
Queue state for pre-parsed tmux commands.
Implementations§
Source§impl CommandQueue
impl CommandQueue
Sourcepub fn from_parsed(commands: ParsedCommands) -> Self
pub fn from_parsed(commands: ParsedCommands) -> Self
Builds a queue from one parsed command list.
Sourcepub fn items(&self) -> &VecDeque<QueuedCommand>
pub fn items(&self) -> &VecDeque<QueuedCommand>
Returns the pending commands in queue order.
Sourcepub fn append_parsed(&mut self, commands: ParsedCommands)
pub fn append_parsed(&mut self, commands: ParsedCommands)
Appends a parsed command list to the back of the queue.
Sourcepub fn insert_after_current(&mut self, commands: ParsedCommands)
pub fn insert_after_current(&mut self, commands: ParsedCommands)
Inserts a parsed command list immediately after the command currently being executed.
Callers pop the current item before firing it, so insertion after the current item is represented as prepending the newly built items before the remaining queue tail.
Sourcepub fn pop_front(&mut self) -> Option<QueuedCommand>
pub fn pop_front(&mut self) -> Option<QueuedCommand>
Pops the next queue item.
Sourcepub fn remove_group(&mut self, group: CommandGroup) -> usize
pub fn remove_group(&mut self, group: CommandGroup) -> usize
Removes all pending items from the same group.
This matches tmux cmdq_remove_group: the failed item has already
fired, and only later items are eligible for removal.
Trait Implementations§
Source§impl Clone for CommandQueue
impl Clone for CommandQueue
Source§fn clone(&self) -> CommandQueue
fn clone(&self) -> CommandQueue
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 CommandQueue
impl Debug for CommandQueue
Source§impl Default for CommandQueue
impl Default for CommandQueue
impl Eq for CommandQueue
Source§impl PartialEq for CommandQueue
impl PartialEq for CommandQueue
impl StructuralPartialEq for CommandQueue
Auto Trait Implementations§
impl Freeze for CommandQueue
impl RefUnwindSafe for CommandQueue
impl Send for CommandQueue
impl Sync for CommandQueue
impl Unpin for CommandQueue
impl UnsafeUnpin for CommandQueue
impl UnwindSafe for CommandQueue
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