pub struct ThreadSim { /* private fields */ }
Expand description
Main simulation runner.
Implementations§
Source§impl ThreadSim
impl ThreadSim
Sourcepub fn start<T>(params: Parameters<T>) -> ThreadSim
pub fn start<T>(params: Parameters<T>) -> ThreadSim
Starts a simulation thread using the provided parameters.
start
returns a result receiver that can be used to read result snapshots.
Sourcepub fn results(&self) -> &Receiver<SimResult>
pub fn results(&self) -> &Receiver<SimResult>
Returns a reference to the simulation result receiver.
Sourcepub fn stop(self) -> Result<(), SimulationError>
pub fn stop(self) -> Result<(), SimulationError>
Stops the simulation.
Auto Trait Implementations§
impl Freeze for ThreadSim
impl !RefUnwindSafe for ThreadSim
impl Send for ThreadSim
impl !Sync for ThreadSim
impl Unpin for ThreadSim
impl !UnwindSafe for ThreadSim
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