atex 0.3.0

Lib for async local task evaluation(sqlite or in-memory)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::proto::ILogger;

pub struct FuncLogger {
    pub(crate) func: Box<dyn Fn(&str)>,
}

unsafe impl Send for FuncLogger {}
unsafe impl Sync for FuncLogger {}

impl ILogger for FuncLogger {
    fn log(&self, msg: &str) {
        (self.func)(msg)
    }
}