Struct clap_verbosity_flag::Verbosity
source · pub struct Verbosity<L: LogLevel = ErrorLevel> { /* private fields */ }
Expand description
Logging flags to #[command(flatten)]
into your CLI
Implementations§
source§impl<L: LogLevel> Verbosity<L>
impl<L: LogLevel> Verbosity<L>
sourcepub fn new(verbose: u8, quiet: u8) -> Self
pub fn new(verbose: u8, quiet: u8) -> Self
Create a new verbosity instance by explicitly setting the values
sourcepub fn is_present(&self) -> bool
pub fn is_present(&self) -> bool
Whether any verbosity flags (either --verbose
or --quiet
)
are present on the command line.
sourcepub fn log_level_filter(&self) -> LevelFilter
pub fn log_level_filter(&self) -> LevelFilter
Get the log level filter.
Trait Implementations§
source§impl<L: LogLevel> Args for Verbosity<L>
impl<L: LogLevel> Args for Verbosity<L>
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id
][crate::ArgGroup::id] for this set of argumentssource§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
source§impl<L: LogLevel> FromArgMatches for Verbosity<L>
impl<L: LogLevel> FromArgMatches for Verbosity<L>
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
.Auto Trait Implementations§
impl<L> RefUnwindSafe for Verbosity<L>where
L: RefUnwindSafe,
impl<L> Send for Verbosity<L>where
L: Send,
impl<L> Sync for Verbosity<L>where
L: Sync,
impl<L> Unpin for Verbosity<L>where
L: Unpin,
impl<L> UnwindSafe for Verbosity<L>where
L: UnwindSafe,
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