pub struct LimitDiscardStrategy { /* private fields */ }Expand description
A strategy that discards remaining tasks when the micro-step limit is reached.
This strategy prioritizes the continuation of the simulation over absolute
execution accuracy. When the micro-step count exceeds the specified
limit_micro_step_count, the strategy purges all remaining micro-steps
and pending events for the current tick without triggering an error,
effectively forcing the simulation to proceed to the next tick.
Implementations§
Trait Implementations§
Source§impl Clone for LimitDiscardStrategy
impl Clone for LimitDiscardStrategy
Source§fn clone(&self) -> LimitDiscardStrategy
fn clone(&self) -> LimitDiscardStrategy
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<E, M: Model<E>, RunnerError> ContinueStrategy<E, M, RunnerError> for LimitDiscardStrategy
impl<E, M: Model<E>, RunnerError> ContinueStrategy<E, M, RunnerError> for LimitDiscardStrategy
Source§fn handle_micro_step_continue(
&mut self,
model: &M,
unchecked: UncheckedActiveExecutor<E, M>,
) -> ContinuousStrategyResult<E, M, Self::Err>
fn handle_micro_step_continue( &mut self, model: &M, unchecked: UncheckedActiveExecutor<E, M>, ) -> ContinuousStrategyResult<E, M, Self::Err>
Checks the micro-step limit and purges remaining tasks if exceeded.
Auto Trait Implementations§
impl Freeze for LimitDiscardStrategy
impl RefUnwindSafe for LimitDiscardStrategy
impl Send for LimitDiscardStrategy
impl Sync for LimitDiscardStrategy
impl Unpin for LimitDiscardStrategy
impl UnsafeUnpin for LimitDiscardStrategy
impl UnwindSafe for LimitDiscardStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more