pub struct Output { /* private fields */ }Expand description
Where a layer writes formatted lines.
Implementations§
Source§impl Output
impl Output
Sourcepub fn writer<W>(writer: W) -> Self
pub fn writer<W>(writer: W) -> Self
Write to any io::Write. Treated as non-TTY (no auto-color).
Useful for testing, or to send formatted lines to a file. The writer is held behind a mutex so the layer can write from any thread.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether the output is connected to a terminal. Used for color auto-detection.
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 UnsafeUnpin 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