pub struct Output { /* private fields */ }Expand description
Output abstraction with mode-aware formatting
Implementations§
Source§impl Output
impl Output
Sourcepub fn new(mode: OutputMode) -> Self
pub fn new(mode: OutputMode) -> Self
Create a new Output writing to stdout
Sourcepub fn with_writer(mode: OutputMode, writer: Box<dyn Write + Send>) -> Self
pub fn with_writer(mode: OutputMode, writer: Box<dyn Write + Send>) -> Self
Create an Output with a custom writer (for testing)
Sourcepub fn colored(&self, prefix: &str, msg: &str, color: Color)
pub fn colored(&self, prefix: &str, msg: &str, color: Color)
Output a colored message with a custom prefix and color
Sourcepub fn mode(&self) -> OutputMode
pub fn mode(&self) -> OutputMode
Get the current output mode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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