re_byte_size/
tuple_sizes.rs1use crate::SizeBytes;
2
3impl<T, U> SizeBytes for (T, U)
4where
5 T: SizeBytes,
6 U: SizeBytes,
7{
8 #[inline]
9 fn heap_size_bytes(&self) -> u64 {
10 let (a, b) = self;
11 a.heap_size_bytes() + b.heap_size_bytes()
12 }
13
14 #[inline]
15 fn is_pod() -> bool {
16 T::is_pod() && U::is_pod()
17 }
18}
19
20impl<T, U, V> SizeBytes for (T, U, V)
21where
22 T: SizeBytes,
23 U: SizeBytes,
24 V: SizeBytes,
25{
26 #[inline]
27 fn heap_size_bytes(&self) -> u64 {
28 let (a, b, c) = self;
29 a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes()
30 }
31
32 #[inline]
33 fn is_pod() -> bool {
34 T::is_pod() && U::is_pod() && V::is_pod()
35 }
36}
37
38impl<T, U, V, W> SizeBytes for (T, U, V, W)
39where
40 T: SizeBytes,
41 U: SizeBytes,
42 V: SizeBytes,
43 W: SizeBytes,
44{
45 #[inline]
46 fn heap_size_bytes(&self) -> u64 {
47 let (a, b, c, d) = self;
48 a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + d.heap_size_bytes()
49 }
50
51 #[inline]
52 fn is_pod() -> bool {
53 T::is_pod() && U::is_pod() && V::is_pod() && W::is_pod()
54 }
55}