pub struct DeterministicDriver { /* private fields */ }Expand description
Static identity and Rust value types generated for one request Capability. A deterministic, OS-independent Runtime Driver for Kernel conformance tests.
Implementations§
Source§impl DeterministicDriver
impl DeterministicDriver
Sourcepub fn run<F: Future>(&self, future: F) -> F::Output
pub fn run<F: Future>(&self, future: F) -> F::Output
Runs a root Kernel future until its deterministic terminal result.
Sourcepub fn advance(&self, duration: Duration)
pub fn advance(&self, duration: Duration)
Advances monotonic time without consulting a host clock.
Sourcepub fn request_shutdown(&self)
pub fn request_shutdown(&self)
Requests cooperative Kernel shutdown.
Sourcepub fn set_jitter(&self, jitter: Duration)
pub fn set_jitter(&self, jitter: Duration)
Sets the deterministic jitter returned to supervision callers, capped by each policy.
Sourcepub fn with_jitter(self, jitter: Duration) -> Self
pub fn with_jitter(self, jitter: Duration) -> Self
Configures deterministic jitter while retaining builder-style Driver setup.
Trait Implementations§
Source§impl Clone for DeterministicDriver
impl Clone for DeterministicDriver
Source§fn clone(&self) -> DeterministicDriver
fn clone(&self) -> DeterministicDriver
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 DeterministicDriver
impl Debug for DeterministicDriver
Source§impl Default for DeterministicDriver
impl Default for DeterministicDriver
Source§impl RuntimeDriver for DeterministicDriver
impl RuntimeDriver for DeterministicDriver
Source§fn sleep_until(&self, deadline: Duration) -> LocalBoxFuture<'static, ()>
fn sleep_until(&self, deadline: Duration) -> LocalBoxFuture<'static, ()>
Waits until the supplied monotonic instant.
Source§fn yield_now(&self) -> LocalBoxFuture<'static, ()>
fn yield_now(&self) -> LocalBoxFuture<'static, ()>
Cooperatively yields to other work on the local task lane.
Source§fn jitter(&self, maximum: Duration) -> Duration
fn jitter(&self, maximum: Duration) -> Duration
Supplies deterministic or entropy-backed jitter bounded by the policy value.
Source§fn spawn_local(&self, task: LocalTask) -> Result<DriverTask, SpawnError>
fn spawn_local(&self, task: LocalTask) -> Result<DriverTask, SpawnError>
Schedules Kernel-owned work on the local task lane.
Source§fn shutdown_requested(&self) -> bool
fn shutdown_requested(&self) -> bool
Reports whether the embedding Runner requested shutdown.
Auto Trait Implementations§
impl !RefUnwindSafe for DeterministicDriver
impl !Send for DeterministicDriver
impl !Sync for DeterministicDriver
impl !UnwindSafe for DeterministicDriver
impl Freeze for DeterministicDriver
impl Unpin for DeterministicDriver
impl UnsafeUnpin for DeterministicDriver
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