pub struct Execution { /* private fields */ }Implementations§
Source§impl Execution
impl Execution
pub const fn new( now: fn() -> Instant, sleep: fn(Duration) -> Pin<Box<dyn Future<Output = ()> + Send>>, ) -> Execution
pub fn now(self) -> Instant
pub fn sleep( self, duration: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send>>
pub async fn timeout<F>(
self,
duration: Duration,
future: F,
) -> Result<<F as Future>::Output, Elapsed>where
F: Future,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Execution
impl RefUnwindSafe for Execution
impl Send for Execution
impl Sync for Execution
impl Unpin for Execution
impl UnsafeUnpin for Execution
impl UnwindSafe for Execution
Blanket Implementations§
impl<T> Allocation for T
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