pub struct Cli {
pub command: Commands,
}Fields§
§command: CommandsImplementations§
Source§impl Cli
impl Cli
Sourcepub fn run(self) -> ExitCode
pub fn run(self) -> ExitCode
Run the CLI and return an exit code.
Errors are printed to stderr.
fn run_inner(self) -> Result<Outcome>
Sourcepub fn run_with_io<R: Read, W: Write>(
&self,
reader: R,
writer: W,
) -> Result<Outcome>
pub fn run_with_io<R: Read, W: Write>( &self, reader: R, writer: W, ) -> Result<Outcome>
Run CLI with provided readers and writers for testing
fn create_output_options( &self, show_literal_types: bool, show_expression_types: bool, ) -> OutputOptions
fn resolve_input_format( &self, format: &Option<Format>, input_path: &str, ) -> Result<Format>
fn resolve_output_format( &self, format: &Option<Format>, output_path: &str, ) -> Result<Format>
fn run_convert_with_io<R: Read, W: Write>( &self, reader: R, writer: W, from: &Format, to: &Format, options: &OutputOptions, verbose: bool, ) -> Result<Outcome>
fn run_validate_with_io<R: Read, W: Write>( &self, reader: R, writer: W, verbose: bool, ) -> Result<Outcome>
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
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