pub struct SimTimeProvider { /* private fields */ }Expand description
Simulation time provider that integrates with SimWorld.
Implementations§
Source§impl SimTimeProvider
impl SimTimeProvider
Sourcepub fn new(sim: WeakSimWorld) -> Self
pub fn new(sim: WeakSimWorld) -> Self
Create a new simulation time provider.
Trait Implementations§
Source§impl Clone for SimTimeProvider
impl Clone for SimTimeProvider
Source§fn clone(&self) -> SimTimeProvider
fn clone(&self) -> SimTimeProvider
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimTimeProvider
impl Debug for SimTimeProvider
Source§impl TimeProvider for SimTimeProvider
impl TimeProvider for SimTimeProvider
Source§fn sleep<'life0, 'async_trait>(
&'life0 self,
duration: Duration,
) -> Pin<Box<dyn Future<Output = SimulationResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sleep<'life0, 'async_trait>(
&'life0 self,
duration: Duration,
) -> Pin<Box<dyn Future<Output = SimulationResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sleep for the specified duration. Read more
Source§fn timeout<'life0, 'async_trait, F, T>(
&'life0 self,
duration: Duration,
future: F,
) -> Pin<Box<dyn Future<Output = SimulationResult<Result<T, ()>>> + 'async_trait>>where
F: Future<Output = T> + 'async_trait,
T: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn timeout<'life0, 'async_trait, F, T>(
&'life0 self,
duration: Duration,
future: F,
) -> Pin<Box<dyn Future<Output = SimulationResult<Result<T, ()>>> + 'async_trait>>where
F: Future<Output = T> + 'async_trait,
T: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Run a future with a timeout. Read more
Auto Trait Implementations§
impl Freeze for SimTimeProvider
impl !RefUnwindSafe for SimTimeProvider
impl !Send for SimTimeProvider
impl !Sync for SimTimeProvider
impl Unpin for SimTimeProvider
impl !UnwindSafe for SimTimeProvider
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)