pub struct TimeController;Expand description
Controls tokio’s mock time inside a test.
Obtained from CamelTestContextBuilder::with_time_control().build().
Wraps tokio::time::advance and tokio::time::resume.
§Contract
Only valid inside a #[tokio::test] runtime. tokio::time::pause()
must have been called before use — CamelTestContextBuilder::build()
handles this automatically.
Implementations§
Auto Trait Implementations§
impl Freeze for TimeController
impl RefUnwindSafe for TimeController
impl Send for TimeController
impl Sync for TimeController
impl Unpin for TimeController
impl UnsafeUnpin for TimeController
impl UnwindSafe for TimeController
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