pub struct Time;
Expand description
Implements the TimeAbstraction
trait for standard Rust.
This implementation uses tokio
under the hood and, therefore, all time-based
operations will rely on the Tokio runtime.
Trait Implementations§
Source§impl SystemTime for Time
impl SystemTime for Time
Source§impl TimeAbstraction for Time
impl TimeAbstraction for Time
Source§async fn sleep(duration: Duration) -> Result<(), Error>
async fn sleep(duration: Duration) -> Result<(), Error>
Returns a future that resolves successfully after the specified
duration
(or earlier with an error). Read moreSource§async fn sleep_until(deadline: Instant) -> Result<(), Error>
async fn sleep_until(deadline: Instant) -> Result<(), Error>
Returns a future that resolves successfully at the specified
deadline
(or earlier with an error).Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more