Struct async_speed_limit::clock::StandardClock
source · pub struct StandardClock;
Expand description
The physical clock using std::time::Instant
.
The sleeping future is based on futures-timer
. Blocking sleep uses
std::thread::sleep()
.
Trait Implementations§
source§impl BlockingClock for StandardClock
impl BlockingClock for StandardClock
source§fn blocking_sleep(&self, dur: Duration)
fn blocking_sleep(&self, dur: Duration)
Sleeps and blocks the current thread for the given duration.
source§impl Clock for StandardClock
impl Clock for StandardClock
source§impl Clone for StandardClock
impl Clone for StandardClock
source§fn clone(&self) -> StandardClock
fn clone(&self) -> StandardClock
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StandardClock
impl Debug for StandardClock
source§impl Default for StandardClock
impl Default for StandardClock
source§fn default() -> StandardClock
fn default() -> StandardClock
Returns the “default value” for a type. Read more
impl Copy for StandardClock
Auto Trait Implementations§
impl RefUnwindSafe for StandardClock
impl Send for StandardClock
impl Sync for StandardClock
impl Unpin for StandardClock
impl UnwindSafe for StandardClock
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