pub enum UseArgs {
LegacyPositional(String),
Named(Vec<(String, String, String)>),
}Expand description
§Fase 58.b — the closed catalog of use <Tool> argument forms. The
invocation surfaces are mutually exclusive, so a sum type models them
exactly (no ambiguous dual-empty state). NOTE: apply: Tool given: <struct>
(the splat form) is NOT here — it rides StepNode.apply_ref and is
validated against the tool schema in §58.d, not parsed as a use.
Variants§
LegacyPositional(String)
use Tool on "${arg}" / use Tool on query — the §54.b single
positional argument. D5 back-compat: behaves byte-identically to the
pre-58 argument: String (empty string when no on clause).
Named(Vec<(String, String, String)>)
use Tool(query = "${q}", max_results = 5) — D2 canonical multi-field
keyword args. Each entry is (name, value, value_kind): value is the
expression STRING (the frontend has no structured Expr; mirrors
argument / parse_argument_list); value_kind is "literal" or
"reference" — the §Fase 60 classification from parse_let_atom, so the
runtime resolves a bare identifier / Step.output as a binding lookup
(like let) instead of passing the name literally. The type-checker
(§58.d + §60.c) validates each entry against the tool’s declared input
schema (W2 / CT-2 caller blame) and references against their source.
Implementations§
Source§impl UseArgs
impl UseArgs
Sourcepub fn legacy_argument(&self) -> String
pub fn legacy_argument(&self) -> String
§58.b transitional — the legacy single-arg string for the IR argument
field (still String until §58.c carries structured named args).
Named projects an empty argument here; the type-checker validates
named args from the AST, and §58.c/e wire their structured dispatch.
Trait Implementations§
impl StructuralPartialEq for UseArgs
Auto Trait Implementations§
impl Freeze for UseArgs
impl RefUnwindSafe for UseArgs
impl Send for UseArgs
impl Sync for UseArgs
impl Unpin for UseArgs
impl UnsafeUnpin for UseArgs
impl UnwindSafe for UseArgs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more