pub struct SimRunner<const N: usize, const Q: usize> { /* private fields */ }Expand description
Implementations§
Source§impl<const N: usize, const Q: usize> SimRunner<N, Q>
impl<const N: usize, const Q: usize> SimRunner<N, Q>
pub fn new(bus: SimBus<N, Q>) -> Self
Sourcepub fn tick(
&mut self,
nodes: &mut [&mut dyn SimNodeErased<N, Q>],
duration: Duration,
) -> usize
pub fn tick( &mut self, nodes: &mut [&mut dyn SimNodeErased<N, Q>], duration: Duration, ) -> usize
Ticks the simulation by duration microseconds, routing all delivered messages to their
destination nodes and collecting their responses back onto the bus.
Returns the number of messages delivered in this tick.
pub fn bus(&mut self) -> &mut SimBus<N, Q>
Auto Trait Implementations§
impl<const N: usize, const Q: usize> Freeze for SimRunner<N, Q>
impl<const N: usize, const Q: usize> RefUnwindSafe for SimRunner<N, Q>
impl<const N: usize, const Q: usize> Send for SimRunner<N, Q>
impl<const N: usize, const Q: usize> Sync for SimRunner<N, Q>
impl<const N: usize, const Q: usize> Unpin for SimRunner<N, Q>
impl<const N: usize, const Q: usize> UnsafeUnpin for SimRunner<N, Q>
impl<const N: usize, const Q: usize> UnwindSafe for SimRunner<N, Q>
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