pub struct OutputManager { /* private fields */ }Expand description
Main output handler for the CLI
Implementations§
Source§impl OutputManager
impl OutputManager
pub fn new(config: OutputConfig) -> Self
Sourcepub fn output<T>(&self, data: &T, format: Option<&str>) -> CliResult<()>where
T: Serialize + OutputFormat,
pub fn output<T>(&self, data: &T, format: Option<&str>) -> CliResult<()>where
T: Serialize + OutputFormat,
Print formatted output based on the configured format
Sourcepub fn config(&self) -> &OutputConfig
pub fn config(&self) -> &OutputConfig
Get the output configuration
Sourcepub fn progress_bar(&self, len: u64) -> ProgressBar
pub fn progress_bar(&self, len: u64) -> ProgressBar
Create a progress bar
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputManager
impl RefUnwindSafe for OutputManager
impl Send for OutputManager
impl Sync for OutputManager
impl Unpin for OutputManager
impl UnsafeUnpin for OutputManager
impl UnwindSafe for OutputManager
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