pub enum CommandArgument {
String(String),
Commands(ParsedCommands),
}Expand description
A parsed command argument.
Variants§
String(String)
A scalar string argument after tmux quote and expansion handling.
Commands(ParsedCommands)
A brace-delimited nested command list.
Implementations§
Source§impl CommandArgument
impl CommandArgument
Sourcepub fn as_string(&self) -> Option<&str>
pub fn as_string(&self) -> Option<&str>
Returns the string value when this is a scalar argument.
Sourcepub fn to_tmux_string(&self) -> String
pub fn to_tmux_string(&self) -> String
Converts the argument to a string suitable for the legacy CLI bridge.
Sourcepub fn to_tmux_reparse_string(&self) -> String
pub fn to_tmux_reparse_string(&self) -> String
Converts this argument to a lossless representation for an internal parse-execute bridge.
Trait Implementations§
Source§impl Clone for CommandArgument
impl Clone for CommandArgument
Source§fn clone(&self) -> CommandArgument
fn clone(&self) -> CommandArgument
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 CommandArgument
impl Debug for CommandArgument
impl Eq for CommandArgument
Source§impl PartialEq for CommandArgument
impl PartialEq for CommandArgument
impl StructuralPartialEq for CommandArgument
Auto Trait Implementations§
impl Freeze for CommandArgument
impl RefUnwindSafe for CommandArgument
impl Send for CommandArgument
impl Sync for CommandArgument
impl Unpin for CommandArgument
impl UnsafeUnpin for CommandArgument
impl UnwindSafe for CommandArgument
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