size_of/support/
time.rs

1#![cfg(feature = "time")]
2
3use time::{Date, Duration, Month, OffsetDateTime, PrimitiveDateTime, Time, UtcOffset, Weekday};
4
5impl_total_size_childless! {
6    Date,
7    Time,
8    Month,
9    Weekday,
10    Duration,
11    UtcOffset,
12    OffsetDateTime,
13    PrimitiveDateTime,
14}
15
16#[cfg(feature = "time-std")]
17mod time_std {
18    use crate::{Context, SizeOf};
19    use time::Instant;
20
21    impl SizeOf for Instant {
22        fn size_of_children(&self, context: &mut Context) {
23            self.0.size_of_children(context);
24        }
25    }
26}