precept/dispatch/
noop.rs

1use super::{Dispatch, Event};
2
3pub struct NoopDispatch;
4
5impl NoopDispatch {
6    pub fn new_boxed() -> Box<dyn Dispatch> {
7        Box::new(Self)
8    }
9}
10
11impl Dispatch for NoopDispatch {
12    fn emit(&self, _event: Event) {}
13
14    #[inline]
15    fn random(&self) -> u64 {
16        rand::random()
17    }
18}