heed_types/
decode_ignore.rs

1use heed_traits::BoxedError;
2
3/// A convenient struct made to ignore the type when decoding it.
4///
5/// For example, it is appropriate to be used to count keys or to ensure that an
6/// entry exists.
7pub enum DecodeIgnore {}
8
9impl heed_traits::BytesDecode<'_> for DecodeIgnore {
10    type DItem = ();
11
12    fn bytes_decode(_bytes: &[u8]) -> Result<Self::DItem, BoxedError> {
13        Ok(())
14    }
15}