pub struct SimTaskProvider;Expand description
Task provider that spawns onto the deterministic executor driving the current simulation iteration.
Where TokioTaskProvider binds tasks to the ambient tokio runtime, this
provider binds them to the executor installed by
Executor::block_on: scheduling
order is a seeded-random, fully reproducible function of the iteration
seed.
§Panics
spawn_task panics when used outside Executor::block_on (mirroring
tokio::spawn outside a runtime).
Trait Implementations§
Source§impl Clone for SimTaskProvider
impl Clone for SimTaskProvider
Source§fn clone(&self) -> SimTaskProvider
fn clone(&self) -> SimTaskProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimTaskProvider
impl Debug for SimTaskProvider
Source§impl Default for SimTaskProvider
impl Default for SimTaskProvider
Source§fn default() -> SimTaskProvider
fn default() -> SimTaskProvider
Returns the “default value” for a type. Read more
Source§impl TaskProvider for SimTaskProvider
impl TaskProvider for SimTaskProvider
Source§type JoinHandle = JoinHandle<()>
type JoinHandle = JoinHandle<()>
Future returned by
Self::spawn_task. Read moreSource§fn spawn_task<F>(&self, name: &str, future: F) -> Self::JoinHandle
fn spawn_task<F>(&self, name: &str, future: F) -> Self::JoinHandle
Spawn a named task.
Auto Trait Implementations§
impl Freeze for SimTaskProvider
impl RefUnwindSafe for SimTaskProvider
impl Send for SimTaskProvider
impl Sync for SimTaskProvider
impl Unpin for SimTaskProvider
impl UnsafeUnpin for SimTaskProvider
impl UnwindSafe for SimTaskProvider
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