pub trait Deadline { // Required method fn deadline(&self) -> Instant; }
Trait for types that can be used as a timeout or deadline.
Get the instant at which the timeout/deadline expires.
If the "tokio" feature is enabled, this uses [tokio::time::Instant] to compute the deadline. This means that [tokio::time::pause()] and [tokio::time::advance()] will work as expected.
"tokio"
tokio::time::Instant
tokio::time::pause()
tokio::time::advance()