pub struct Cli {
pub format: OutputFormat,
pub verbosity: u8,
pub color: bool,
}Expand description
Common CLI configuration shared across all entrenar tools.
Fields§
§format: OutputFormatOutput format
verbosity: u8Verbosity level (0 = quiet, 1 = normal, 2 = verbose)
color: boolWhether colors are enabled
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn with_format(self, format: OutputFormat) -> Self
pub fn with_format(self, format: OutputFormat) -> Self
Set output format.
Sourcepub fn with_verbosity(self, level: u8) -> Self
pub fn with_verbosity(self, level: u8) -> Self
Set verbosity level.
Sourcepub fn with_color(self, enabled: bool) -> Self
pub fn with_color(self, enabled: bool) -> Self
Enable or disable colors.
Sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Check if verbose mode is enabled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin 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