pub struct Stdout { /* private fields */ }
Expand description
An emitter that writes to stdout
.
Use stdout
to construct an emitter and pass the result to emit::Setup::emit_to
to configure emit
to use it:
fn main() {
let rt = emit::setup()
.emit_to(emit_term::stdout())
.init();
// Your app code goes here
rt.blocking_flush(std::time::Duration::from_secs(30));
}
Implementations§
Source§impl Stdout
impl Stdout
Sourcepub fn new() -> Self
pub fn new() -> Self
Get an emitter that writes to stdout
.
Colors will be used if the terminal supports them.
Sourcepub fn colored(self, colored: bool) -> Self
pub fn colored(self, colored: bool) -> Self
Whether to write using colors.
By default, colors will be used if the terminal supports them. You can explicitly enable or disable colors using this function. If colored
is true then colors will always be used. If colored
is false then colors will never be used.
Trait Implementations§
Source§impl Emitter for Stdout
impl Emitter for Stdout
impl InternalEmitter for Stdout
Auto Trait Implementations§
impl !Freeze for Stdout
impl RefUnwindSafe for Stdout
impl Send for Stdout
impl Sync for Stdout
impl Unpin for Stdout
impl UnwindSafe for Stdout
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