pub trait CheckedSystemTime {
// Required methods
fn checked_add(self, _d: Duration) -> Option<SystemTime>;
fn checked_sub(self, _d: Duration) -> Option<SystemTime>;
}Expand description
Temporary trait for checked operations on SystemTime until these are available in the standard library
Required Methods§
Sourcefn checked_add(self, _d: Duration) -> Option<SystemTime>
fn checked_add(self, _d: Duration) -> Option<SystemTime>
Returns Some<SystemTime> when the result less or equal to i32::max_value to prevent SystemTime to panic because
it is platform specific, possible representations are i32, i64, u64 or Duration. None otherwise
Sourcefn checked_sub(self, _d: Duration) -> Option<SystemTime>
fn checked_sub(self, _d: Duration) -> Option<SystemTime>
Returns Some<SystemTime> when the result is successful and None when it is not