pub struct CliProgramBuilder;Expand description
Constructs neutral CLI programs.
Implementations§
Source§impl CliProgramBuilder
impl CliProgramBuilder
Sourcepub fn commands(&self) -> CliProgram<Empty>
pub fn commands(&self) -> CliProgram<Empty>
Starts an empty, uninterpreted CLI program.
Sourcepub fn op<Handler>(&self, handler: Handler) -> Operation<Handler>
pub fn op<Handler>(&self, handler: Handler) -> Operation<Handler>
Wraps a first-order handler operation in a neutral declaration with no arguments.
Sourcepub fn program<Program>(&self, program: Program) -> CliProgram<Named<Program>>
pub fn program<Program>(&self, program: Program) -> CliProgram<Named<Program>>
Includes a named CLI program in another program.
Sourcepub fn positional(&self, doc: &'static str) -> PositionalSource
pub fn positional(&self, doc: &'static str) -> PositionalSource
Declares a source taking an argument’s words by position.
Sourcepub fn product(&self) -> ProductSource<()>
pub fn product(&self) -> ProductSource<()>
Declares a product: an argument made of fields given together, one named source each.
Sourcepub fn sum(&self) -> SumSource<()>
pub fn sum(&self) -> SumSource<()>
Declares a sum: an argument given as exactly one of its alternatives, one named source each.
Sourcepub fn named(&self, doc: &'static str) -> NamedSource
pub fn named(&self, doc: &'static str) -> NamedSource
Declares a source taking an argument’s words after its spelling, --argument-name.
Trait Implementations§
Source§impl Debug for CliProgramBuilder
impl Debug for CliProgramBuilder
Auto Trait Implementations§
impl Freeze for CliProgramBuilder
impl RefUnwindSafe for CliProgramBuilder
impl Send for CliProgramBuilder
impl Sync for CliProgramBuilder
impl Unpin for CliProgramBuilder
impl UnsafeUnpin for CliProgramBuilder
impl UnwindSafe for CliProgramBuilder
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<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<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.