pub struct Stderr { /* private fields */ }Expand description
An emitter that writes to stderr.
Use stderr 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::stderr())
.init();
// Your app code goes here
rt.blocking_flush(std::time::Duration::from_secs(30));
}Implementations§
Source§impl Stderr
impl Stderr
Sourcepub fn new() -> Self
pub fn new() -> Self
Get an emitter that writes to stderr.
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 Stderr
impl Emitter for Stderr
impl InternalEmitter for Stderr
Auto Trait Implementations§
impl !Freeze for Stderr
impl RefUnwindSafe for Stderr
impl Send for Stderr
impl Sync for Stderr
impl Unpin for Stderr
impl UnwindSafe for Stderr
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