1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![cfg(feature = "time")]

use time::{Date, Duration, Month, OffsetDateTime, PrimitiveDateTime, Time, UtcOffset, Weekday};

impl_total_size_childless! {
    Date,
    Time,
    Month,
    Weekday,
    Duration,
    UtcOffset,
    OffsetDateTime,
    PrimitiveDateTime,
}

#[cfg(feature = "time-std")]
mod time_std {
    use crate::{Context, SizeOf};
    use time::Instant;

    impl SizeOf for Instant {
        fn size_of_children(&self, context: &mut Context) {
            self.0.size_of_children(context);
        }
    }
}