pub struct WorkersClock;Trait Implementations§
Source§impl Clock for WorkersClock
impl Clock for WorkersClock
fn now(&self) -> OffsetDateTime
Source§fn timeout_any<'life0, 'async_trait>(
&'life0 self,
fut: BoxFuture<'static, Box<dyn Any + Send>>,
after: Duration,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any + Send>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn timeout_any<'life0, 'async_trait>(
&'life0 self,
fut: BoxFuture<'static, Box<dyn Any + Send>>,
after: Duration,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any + Send>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs
fut to completion, abandoning it after after elapses.
Returns None on timeout. Default: runs to completion (no timer;
test-only — runtimes override).Auto Trait Implementations§
impl Freeze for WorkersClock
impl RefUnwindSafe for WorkersClock
impl Send for WorkersClock
impl Sync for WorkersClock
impl Unpin for WorkersClock
impl UnsafeUnpin for WorkersClock
impl UnwindSafe for WorkersClock
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