pub enum Arg {
String(String, bool),
Expr(Expr),
Parts(Vec<ArgPart>),
}Expand description
A command argument — either an expandable string or an expression.
Variants§
String(String, bool)
Expandable string. The bool indicates whether the argument was
quoted in the source (true) or unquoted (false). Quoted arguments
that start with -- are positional, not flags.
Expr(Expr)
Expression — resolved at runtime via evaluate_expr.
Parts(Vec<ArgPart>)
Mixed literal/expression value (e.g. KEY={{ $x }} tail). Fragments
resolve independently at runtime and concatenate with no added
separator — inter-fragment gaps are already materialized as Text.
Implementations§
Source§impl Arg
impl Arg
pub fn as_str(&self) -> &str
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
Owned display form: String verbatim, Expr as source ($x),
Parts as fragment concatenation. Used for diagnostics and Display;
runtime resolution must match on variants instead (see resolve_arg).
pub fn is_quoted(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Arg
Auto Trait Implementations§
impl Freeze for Arg
impl RefUnwindSafe for Arg
impl Send for Arg
impl Sync for Arg
impl Unpin for Arg
impl UnsafeUnpin for Arg
impl UnwindSafe for Arg
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