tailspin 6.0.0

A log file highlighter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod stdout;
pub mod temp_file;

use crate::io::controller::Writer;
use anyhow::Result;

pub trait AsyncLineWriter {
    async fn write(&mut self, line: &str) -> Result<()>;
}

impl AsyncLineWriter for Writer {
    async fn write(&mut self, line: &str) -> Result<()> {
        match self {
            Writer::TempFile(w) => w.write(line).await,
            Writer::Stdout(w) => w.write(line).await,
        }
    }
}