1use super::DataSize;
2use core::mem::size_of;
3
4impl<T> DataSize for futures::channel::oneshot::Sender<T> {
5 const IS_DYNAMIC: bool = false;
6 const STATIC_HEAP_SIZE: usize = 0;
7
8 #[inline]
9 fn estimate_heap_size(&self) -> usize {
10 0
11 }
12}
13
14impl<T> DataSize for futures::channel::oneshot::Receiver<T> {
18 const IS_DYNAMIC: bool = false;
19 const STATIC_HEAP_SIZE: usize = size_of::<T>() + 3 * size_of::<usize>();
20
21 #[inline]
22 fn estimate_heap_size(&self) -> usize {
23 Self::STATIC_HEAP_SIZE
25 }
26}