size_of/support/
ordered_float.rs1#![cfg(feature = "ordered-float")]
2
3use crate::{Context, SizeOf};
4use ordered_float::{Float, FloatIsNan, NotNan, OrderedFloat};
5
6impl_total_size_childless! {
7 FloatIsNan,
8}
9
10impl<T> SizeOf for NotNan<T>
11where
12 T: Float + SizeOf,
15{
16 #[inline]
17 fn size_of_children(&self, context: &mut Context) {
18 T::size_of_children(self, context);
19 }
20}
21
22impl<T> SizeOf for OrderedFloat<T>
23where
24 T: Float + SizeOf,
27{
28 #[inline]
29 fn size_of_children(&self, context: &mut Context) {
30 T::size_of_children(self, context);
31 }
32}