pub enum Verbosity {
Quiet,
Normal,
Verbose,
Debug,
}Expand description
Verbosity level for CLI output.
This enum provides a structured way to control output verbosity, replacing individual boolean flags with a single, clear setting.
§Ordering
Levels are ordered from quietest to most verbose:
Quiet < Normal < Verbose < Debug
This allows easy comparison:
use blz_cli::args::Verbosity;
assert!(Verbosity::Quiet < Verbosity::Normal);
assert!(Verbosity::Verbose < Verbosity::Debug);Variants§
Quiet
Suppress all output except errors.
Useful for scripts and CI where only exit codes matter.
Normal
Standard output level (default).
Shows results, warnings, and important information.
Verbose
Show additional details.
Includes timing information, progress indicators, and contextual details that help understand what’s happening.
Debug
Full diagnostic output.
Shows all available information including performance metrics, internal state, and debug-level logging. Primarily for development and troubleshooting.
Implementations§
Source§impl Verbosity
impl Verbosity
Sourcepub const fn from_flags(quiet: bool, verbose: bool, debug: bool) -> Self
pub const fn from_flags(quiet: bool, verbose: bool, debug: bool) -> Self
Create a Verbosity from individual boolean flags.
This provides backward compatibility with the legacy flag pattern. Priority order: debug > verbose > quiet > normal
§Examples
use blz_cli::args::Verbosity;
// All false = Normal
assert_eq!(Verbosity::from_flags(false, false, false), Verbosity::Normal);
// Quiet takes precedence when alone
assert_eq!(Verbosity::from_flags(true, false, false), Verbosity::Quiet);
// Verbose takes precedence over quiet
assert_eq!(Verbosity::from_flags(true, true, false), Verbosity::Verbose);
// Debug takes precedence over everything
assert_eq!(Verbosity::from_flags(true, true, true), Verbosity::Debug);Sourcepub const fn show_warnings(self) -> bool
pub const fn show_warnings(self) -> bool
Check if warning messages should be shown.
Warnings are shown at Normal level and above.
Sourcepub const fn show_info(self) -> bool
pub const fn show_info(self) -> bool
Check if informational messages should be shown.
Info messages are shown at Normal level and above.
Sourcepub const fn show_verbose(self) -> bool
pub const fn show_verbose(self) -> bool
Check if verbose output should be shown.
Verbose output is shown at Verbose level and above.
Sourcepub const fn show_debug(self) -> bool
pub const fn show_debug(self) -> bool
Check if debug output should be shown.
Debug output is only shown at Debug level.
Sourcepub const fn is_verbose(self) -> bool
pub const fn is_verbose(self) -> bool
Check if verbose mode is enabled.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Verbosity
impl<'de> Deserialize<'de> for Verbosity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Verbosity
impl Ord for Verbosity
Source§impl PartialOrd for Verbosity
impl PartialOrd for Verbosity
impl Copy for Verbosity
impl Eq for Verbosity
impl StructuralPartialEq for Verbosity
Auto Trait Implementations§
impl Freeze for Verbosity
impl RefUnwindSafe for Verbosity
impl Send for Verbosity
impl Sync for Verbosity
impl Unpin for Verbosity
impl UnwindSafe for Verbosity
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.