pub struct ParsedCommands { /* private fields */ }Expand description
Parser output for one command list.
Implementations§
Source§impl ParsedCommands
impl ParsedCommands
Sourcepub fn commands(&self) -> &[ParsedCommand]
pub fn commands(&self) -> &[ParsedCommand]
Returns the parsed command sequence.
Sourcepub fn assignments(&self) -> &[EnvironmentAssignment]
pub fn assignments(&self) -> &[EnvironmentAssignment]
Returns parse-time environment assignments.
Sourcepub const fn grouping(&self) -> CommandGrouping
pub const fn grouping(&self) -> CommandGrouping
Returns how queue group IDs should be assigned for this parsed list.
Sourcepub fn into_commands(self) -> Vec<ParsedCommand>
pub fn into_commands(self) -> Vec<ParsedCommand>
Consumes the list and returns only the command sequence.
Sourcepub fn append(&mut self, other: Self)
pub fn append(&mut self, other: Self)
Appends another parsed command list, preserving the grouping mode of this list.
Sourcepub fn add_line_offset(&mut self, offset: usize)
pub fn add_line_offset(&mut self, offset: usize)
Adds an offset to every source line recorded in this command list.
Recovery parsers use this after parsing a suffix of a larger source file so diagnostics and verbose output still reference original lines.
Sourcepub fn to_tmux_string(&self) -> String
pub fn to_tmux_string(&self) -> String
Converts the parsed commands back to a tmux-style command string.
Sourcepub fn to_tmux_binding_string(&self) -> String
pub fn to_tmux_binding_string(&self) -> String
Converts the parsed commands to a command string suitable for
embedding in a bind-key line.
Sourcepub fn to_tmux_reparse_string(&self) -> String
pub fn to_tmux_reparse_string(&self) -> String
Converts the parsed commands to a lossless command string that can be parsed again without applying display-only quote escaping twice.
Sourcepub fn assignments_to_tmux_reparse_string(&self) -> String
pub fn assignments_to_tmux_reparse_string(&self) -> String
Converts only the parse-time assignments to a lossless command string.
Trait Implementations§
Source§impl Clone for ParsedCommands
impl Clone for ParsedCommands
Source§fn clone(&self) -> ParsedCommands
fn clone(&self) -> ParsedCommands
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more