pub struct CompiledSimInstance<'a> { /* private fields */ }Available on
stageleft_runtime and crate feature sim only.Expand description
A single instance of a compiled Hydro simulation, which provides methods to interactively execute the simulation, feed inputs, and receive outputs.
Implementations§
Source§impl<'a> CompiledSimInstance<'a>
impl<'a> CompiledSimInstance<'a>
Sourcepub async fn run_with_scheduler_and_logger<W: Write>(
self,
log_writer: W,
thunk: impl Future<Output = ()>,
)
pub async fn run_with_scheduler_and_logger<W: Write>( self, log_writer: W, thunk: impl Future<Output = ()>, )
Runs the simulation scheduler alongside the given future, until the future completes, reporting the simulation trace to the given logger.
The future always gets to run first; whenever it is blocked (e.g. waiting to receive simulation outputs), the scheduler runs a single step to completion. Steps are atomic with respect to the future: it is re-polled between every pair of scheduler steps, but never while a step is in flight.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CompiledSimInstance<'a>
impl<'a> !Send for CompiledSimInstance<'a>
impl<'a> !Sync for CompiledSimInstance<'a>
impl<'a> !UnwindSafe for CompiledSimInstance<'a>
impl<'a> Freeze for CompiledSimInstance<'a>
impl<'a> Unpin for CompiledSimInstance<'a>
impl<'a> UnsafeUnpin for CompiledSimInstance<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.