use std::fmt;
use crate::Diagnostic;
use crate::Error;
use crate::record::Record;
mod stdio;
mod testing;
pub use self::stdio::Stderr;
pub use self::stdio::Stdout;
pub use self::testing::Testing;
pub trait Append: fmt::Debug + Send + Sync + 'static {
fn append(&self, record: &Record, diags: &[Box<dyn Diagnostic>]) -> Result<(), Error>;
fn flush(&self) -> Result<(), Error>;
fn exit(&self) -> Result<(), Error> {
self.flush()
}
}
impl<T: Append> From<T> for Box<dyn Append> {
fn from(value: T) -> Self {
Box::new(value)
}
}