pub struct EntryPoint { /* private fields */ }Expand description
The command line, and what it means.
It lives in the library rather than in main so the mapping from arguments
to a run – which root, which command, which overrides – is something a
test can call. main is left with nothing but an exit code to return.
Implementations§
Source§impl EntryPoint
impl EntryPoint
Sourcepub fn run(args: Vec<String>) -> ExitCode
pub fn run(args: Vec<String>) -> ExitCode
Parse args, run what they ask for, and report the outcome.
Taking the arguments rather than reading argv is what lets a test
call this at all; main passes the real ones.
Sourcepub fn overrides(&self) -> CliOverrides
pub fn overrides(&self) -> CliOverrides
What the flags override in the loaded configuration.
The three booleans become Some(true) or None rather than
Some(false): a flag that was not passed has no opinion, and a config
file that turned the behaviour on must not be switched off by its
absence.
Sourcepub const fn format(&self) -> OutputFormat
pub const fn format(&self) -> OutputFormat
The output format asked for.
Trait Implementations§
Source§impl Args for EntryPoint
impl Args for EntryPoint
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 EntryPoint
impl CommandFactory for EntryPoint
Source§impl FromArgMatches for EntryPoint
impl FromArgMatches for EntryPoint
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 EntryPoint
impl Parser for EntryPoint
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 EntryPoint
impl RefUnwindSafe for EntryPoint
impl Send for EntryPoint
impl Sync for EntryPoint
impl Unpin for EntryPoint
impl UnsafeUnpin for EntryPoint
impl UnwindSafe for EntryPoint
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