pub enum Verbosity {
Quiet,
Normal,
Verbose,
Debug,
Trace,
}Expand description
Verbosity levels for CLI output.
Determines logging detail, progress bar visibility, and timing information.
Variants§
Quiet
Only errors (-q).
Suppresses all output except errors. No progress bars or informational messages.
Normal
Progress + results (default).
Shows progress bars, informational messages, and results.
Verbose
Debug info (-v).
Includes timing information and debug-level logging.
Debug
Trace-level logging (-vv).
Enables trace-level logging with file and line information.
Trace
All internal details (-vvv).
Maximum verbosity with all internal details and trace logging.
Implementations§
Source§impl Verbosity
impl Verbosity
Sourcepub fn from_flags(verbose: u8, quiet: bool) -> Self
pub fn from_flags(verbose: u8, quiet: bool) -> Self
Create verbosity level from command-line flags.
§Arguments
verbose- Number of-vflags (0 = normal, 1 = verbose, 2 = debug, 3+ = trace)quiet- Whether-qflag was specified (overrides verbose)
§Examples
use oxigaf_cli::verbosity::Verbosity;
let quiet = Verbosity::from_flags(0, true);
assert_eq!(quiet, Verbosity::Quiet);
let normal = Verbosity::from_flags(0, false);
assert_eq!(normal, Verbosity::Normal);
let verbose = Verbosity::from_flags(1, false);
assert_eq!(verbose, Verbosity::Verbose);
let trace = Verbosity::from_flags(3, false);
assert_eq!(trace, Verbosity::Trace);Sourcepub fn tracing_level(&self) -> Level
pub fn tracing_level(&self) -> Level
Get the tracing level for this verbosity.
Maps verbosity to appropriate tracing::Level:
- Quiet → ERROR
- Normal → INFO
- Verbose → DEBUG
- Debug/Trace → TRACE
Sourcepub fn show_progress(&self) -> bool
pub fn show_progress(&self) -> bool
Whether progress bars should be shown.
Progress bars are shown in Normal and Verbose modes, but hidden in Quiet, Debug, and Trace modes (where detailed logging is preferred).
Sourcepub fn show_timing(&self) -> bool
pub fn show_timing(&self) -> bool
Whether detailed timing information should be shown.
Timing information is shown in Verbose, Debug, and Trace modes.
Trait Implementations§
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 UnsafeUnpin 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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.