pub struct CmdArg<I = String> {
pub opts: Vec<(String, Ast<I>)>,
pub arg: Ast<I>,
}Expand description
One command-application argument (3b-β): arg is the ordinary
positional argument value, opts is this argument’s supplied
?(l = e, …) labeled-optional bundle — upstream’s UTCommandArg of (label * expr) list * expr (types.cppo.ml:583-584). All of 0.0.6, and
every V0_1 command call with no bundle, emits opts: vec![], behaving
exactly like a bare Ast. A non-empty opts folds through
eval::Interp::apply_with_opts (like Ast::ApplyOpt) instead of a plain
apply; each label the command declares but this call omits still
defaults to None there.
Fields§
§opts: Vec<(String, Ast<I>)>§arg: Ast<I>Implementations§
Trait Implementations§
impl<I: PartialEq> StructuralPartialEq for CmdArg<I>
Auto Trait Implementations§
impl<I = String> !Send for CmdArg<I>
impl<I = String> !Sync for CmdArg<I>
impl<I> Freeze for CmdArg<I>
impl<I> RefUnwindSafe for CmdArg<I>
impl<I> Unpin for CmdArg<I>
impl<I> UnsafeUnpin for CmdArg<I>
impl<I> UnwindSafe for CmdArg<I>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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