pub struct Parsed { /* private fields */ }Expand description
The words after a command’s path, assigned to the command’s arguments.
A word is an operating system string, as the command line gives it, so a word that is not UTF-8 reaches an argument that takes it unchanged.
Trait Implementations§
Source§impl<Value> CliWordAlg<Value, OsString> for Parsedwhere
Value: DirectWord,
Decodes a word with the value’s DirectWord.
impl<Value> CliWordAlg<Value, OsString> for Parsedwhere
Value: DirectWord,
Decodes a word with the value’s DirectWord.
Source§impl CliWordsAlg for Parsed
impl CliWordsAlg for Parsed
Source§type Word = OsString
type Word = OsString
What one word is: text, an operating system string, bytes. The interpreter chooses, so a
word the command line gives reaches the value it denotes unchanged.
Source§fn cli_words(&self, argument: &ArgumentInfo) -> Vec<OsString>
fn cli_words(&self, argument: &ArgumentInfo) -> Vec<OsString>
Returns the words the command line gives for
argument, in the order they were given.Source§fn cli_env(&self, name: &str) -> Option<OsString>
fn cli_env(&self, name: &str) -> Option<OsString>
Returns the value of the environment variable
name, if it is set.Source§fn cli_default(&self, default: &'static str) -> OsString
fn cli_default(&self, default: &'static str) -> OsString
Returns the word a declared default spells.
impl Eq for Parsed
impl StructuralPartialEq for Parsed
Auto Trait Implementations§
impl Freeze for Parsed
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnsafeUnpin for Parsed
impl UnwindSafe for Parsed
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
Source§impl<This> CliDeclarationLawsExt<This> for This
impl<This> CliDeclarationLawsExt<This> for This
Source§fn law_cli_declaration<Operation, Sources, Mode, Commands>(
&self,
name: &'static str,
operation: Operation,
sources: Sources,
mode: Mode,
conventions: Conventions,
) -> Result<(), &'static str>where
This: CliOperationAlg<Operation, Sources, Mode, Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Operation: OperationAlg,
Sources: CliSources<<Operation as OperationAlg>::Args>,
fn law_cli_declaration<Operation, Sources, Mode, Commands>(
&self,
name: &'static str,
operation: Operation,
sources: Sources,
mode: Mode,
conventions: Conventions,
) -> Result<(), &'static str>where
This: CliOperationAlg<Operation, Sources, Mode, Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Operation: OperationAlg,
Sources: CliSources<<Operation as OperationAlg>::Args>,
Checks that operation declared under name with sources describes exactly that, with
one argument per operation argument, in order, and distinct spellings and positions.
Source§impl<This> CliOutcomeLawsExt<This> for This
impl<This> CliOutcomeLawsExt<This> for This
Source§impl<Source> CliPartsFor<ContextArg> for Source
impl<Source> CliPartsFor<ContextArg> for Source
Source§impl<This> CliProgramExt<This> for This
impl<This> CliProgramExt<This> for This
Source§fn compile_cli<Program>(
&self,
program: Program,
) -> <Program as CliProgramAlg<This>>::Commandswhere
Program: CliProgramAlg<This>,
fn compile_cli<Program>(
&self,
program: Program,
) -> <Program as CliProgramAlg<This>>::Commandswhere
Program: CliProgramAlg<This>,
Compiles a named CLI program with this interpreter.
impl<Source> CliStatedFor<ContextArg> for Source
Source§impl<This> ShapeProgramExt<This> for This
impl<This> ShapeProgramExt<This> for This
Source§fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
Folds a declaration with this interpretation.