pub struct Cli { /* private fields */ }
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn crates(&self) -> &Vec<PathBuf>
pub fn crates(&self) -> &Vec<PathBuf>
One or more crate directories to scan. If none, current dir is used.
Sourcepub fn include_tests(&self) -> &bool
pub fn include_tests(&self) -> &bool
Include test code?
Sourcepub fn single_test_name(&self) -> &Option<String>
pub fn single_test_name(&self) -> &Option<String>
Single out one test block by name.
Sourcepub fn omit_private(&self) -> &bool
pub fn omit_private(&self) -> &bool
Omit private functions?
Sourcepub fn omit_bodies(&self) -> &bool
pub fn omit_bodies(&self) -> &bool
Omit function bodies?
Sourcepub fn single_function_name(&self) -> &Option<String>
pub fn single_function_name(&self) -> &Option<String>
Only include one function body by name.
Sourcepub fn excluded_files(&self) -> &Vec<String>
pub fn excluded_files(&self) -> &Vec<String>
Exclude specified files (by relative path).
Sourcepub fn exclude_main_file(&self) -> &bool
pub fn exclude_main_file(&self) -> &bool
Exclude main file (like src/lib.rs)?
Sourcepub fn remove_doc_comments(&self) -> &bool
pub fn remove_doc_comments(&self) -> &bool
Remove doc comments from functions
Trait Implementations§
Source§impl StructOpt for Cli
impl StructOpt for Cli
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure. Read moreAuto 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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