pub struct FixedClock(pub OffsetDateTime);Tuple Fields§
§0: OffsetDateTimeTrait Implementations§
Source§impl Clock for FixedClock
impl Clock for FixedClock
fn now(&self) -> OffsetDateTime
Source§fn timeout_any<'life0, 'async_trait>(
&'life0 self,
fut: Pin<Box<dyn Future<Output = Box<dyn Any + Send>> + Send>>,
after: Duration,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn timeout_any<'life0, 'async_trait>(
&'life0 self,
fut: Pin<Box<dyn Future<Output = Box<dyn Any + Send>> + Send>>,
after: Duration,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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).Source§impl Clone for FixedClock
impl Clone for FixedClock
Source§fn clone(&self) -> FixedClock
fn clone(&self) -> FixedClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FixedClock
impl RefUnwindSafe for FixedClock
impl Send for FixedClock
impl Sync for FixedClock
impl Unpin for FixedClock
impl UnsafeUnpin for FixedClock
impl UnwindSafe for FixedClock
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