starbase_console 0.6.26

Console reporting layer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::stream::ConsoleStream;
use std::fmt;

pub trait Reporter: fmt::Debug + Send + Sync {
    fn inherit_streams(&mut self, _err: ConsoleStream, _out: ConsoleStream) {}

    #[cfg(feature = "ui")]
    fn inherit_theme(&mut self, _theme: crate::theme::ConsoleTheme) {}
}

pub type BoxedReporter = Box<dyn Reporter>;

#[derive(Debug, Default)]
pub struct EmptyReporter;

impl Reporter for EmptyReporter {}