pusherator/
null.rs

1use std::marker::PhantomData;
2
3use super::Pusherator;
4
5#[derive(Clone, Copy)]
6pub struct Null<In> {
7    phantom: PhantomData<In>,
8}
9
10impl<In> Null<In> {
11    pub fn new() -> Self {
12        Self {
13            phantom: Default::default(),
14        }
15    }
16}
17
18impl<In> Default for Null<In> {
19    fn default() -> Self {
20        Self::new()
21    }
22}
23
24impl<In> Pusherator for Null<In> {
25    type Item = In;
26    fn give(&mut self, _: Self::Item) {}
27}