mongodb_ro/
event.rs

1use mongodb::bson::Document;
2use mongodb::ClientSession;
3
4pub trait Boot {
5    type Req;
6    async fn finish(
7        &self,
8        _req: &Option<Self::Req>,
9        typ: &str,
10        old: Document,
11        new: Document,
12        _session: Option<&mut ClientSession>,
13    ) {
14        log::debug!("{} operation completed: {:?} => {:?}", typ, old, new);
15    }
16
17    fn cast(&self, data: Document,_req: &Option<Self::Req>,)->Document{
18        data
19    }
20}