std.time.ToInstant
ToInstant
A type which can be converted to an Instant
This is useful when you want create a deadline that supports both Instant
and Duration
as an input.
Required methods
to_instant
Show source codeHide source code
fn pub to_instant -> Instant
fn pub to_instant -> Instant
Converts self
into an Instant
.
Implementations
Duration
impl ToInstant for Duration
Instant
impl ToInstant for Instant