Skip to main content

object_rainbow/impls/
refs.rs

1use crate::*;
2
3impl<T: ToOutput> ToOutput for &T {
4    fn to_output(&self, output: &mut dyn Output) {
5        (**self).to_output(output);
6    }
7}
8
9impl<T: InlineOutput> InlineOutput for &T {}
10
11impl<T: ListHashes> ListHashes for &T {
12    fn list_hashes(&self, f: &mut impl FnMut(Hash)) {
13        (**self).list_hashes(f);
14    }
15
16    fn topology_hash(&self) -> Hash {
17        (**self).topology_hash()
18    }
19
20    fn point_count(&self) -> usize {
21        (**self).point_count()
22    }
23}
24
25impl<T: Tagged> Tagged for &T {
26    const TAGS: Tags = T::TAGS;
27    const HASH: Hash = T::HASH;
28}
29
30impl<T: Topological> Topological for &T {
31    fn traverse(&self, visitor: &mut impl PointVisitor) {
32        (**self).traverse(visitor);
33    }
34}