pub struct TestRuntime {
pub clock: TestClockImpl,
/* private fields */
}Fields§
§clock: TestClockImplImplementations§
Source§impl TestRuntime
impl TestRuntime
pub fn new() -> Self
pub fn block_on<R, E, A>(&self, effect: Effect<R, E, A>, env: R) -> Exit<E, A>
pub fn spawn<R, E, A>( &self, effect: Effect<R, E, A>, env: R, ) -> JoinHandle<Exit<E, A>>
pub async fn advance(&self, duration: Duration)
pub fn advance_blocking(&self, duration: Duration)
pub fn block_on_future<F>(&self, future: F) -> F::Outputwhere
F: Future,
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TestRuntime
impl RefUnwindSafe for TestRuntime
impl Send for TestRuntime
impl Sync for TestRuntime
impl Unpin for TestRuntime
impl UnwindSafe for TestRuntime
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