pub struct Timewrap<T, S = ()>where
T: Time,{ /* private fields */ }Implementations§
Source§impl<T, S> Timewrap<T, S>
impl<T, S> Timewrap<T, S>
pub fn new_with_time(time: T) -> Self
Source§impl<T, S> Timewrap<T, S>
impl<T, S> Timewrap<T, S>
pub fn new_with_state(state: S) -> Self
Source§impl<T, S> Timewrap<T, S>where
T: Time,
impl<T, S> Timewrap<T, S>where
T: Time,
pub fn new_with_time_and_state(time: T, state: S) -> Self
pub fn current_time(&self) -> T
pub fn state(&self) -> &S
pub fn into_state(self) -> S
pub fn spawn<F>(&self, f: F)
pub fn spawn_at<F>(&self, time: T, f: F)
pub async fn drive(&mut self, time: T)
Trait Implementations§
Auto Trait Implementations§
impl<T, S> Freeze for Timewrap<T, S>
impl<T, S = ()> !RefUnwindSafe for Timewrap<T, S>
impl<T, S> Send for Timewrap<T, S>
impl<T, S> Sync for Timewrap<T, S>
impl<T, S> Unpin for Timewrap<T, S>
impl<T, S = ()> !UnwindSafe for Timewrap<T, S>
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