pub struct ReachMaxIteration<State: IterState> {
pub max_iteration: u64,
/* private fields */
}
Expand description
Error indicating that the solver reached the maximum iteration.
This error occurs when the solver exceeds the specified maximum number of iterations without reaching termination condition. It contains both the iteration limit that was reached and the final state the solver had achieved when the limit was exceeded.
Fields§
§max_iteration: u64
The maximum iteration count that was reached.
Implementations§
Source§impl<State: IterState> ReachMaxIteration<State>
impl<State: IterState> ReachMaxIteration<State>
Sourcepub fn take_final_state(self) -> State
pub fn take_final_state(self) -> State
Consumes self and returns the final state reached by the solver.
Sourcepub fn final_state_ref(&self) -> &State
pub fn final_state_ref(&self) -> &State
Returns an immutable reference to the final state reached by the solver.
Sourcepub fn get_solution(&self) -> State::Solution
pub fn get_solution(&self) -> State::Solution
Directly obtains IterState::Solution
from the final state reached by the solver.
Trait Implementations§
Source§impl<State: Clone + IterState> Clone for ReachMaxIteration<State>
impl<State: Clone + IterState> Clone for ReachMaxIteration<State>
Source§fn clone(&self) -> ReachMaxIteration<State>
fn clone(&self) -> ReachMaxIteration<State>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<State: IterState> Display for ReachMaxIteration<State>
impl<State: IterState> Display for ReachMaxIteration<State>
Source§impl<State: IterState> Error for ReachMaxIteration<State>
impl<State: IterState> Error for ReachMaxIteration<State>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<State> Freeze for ReachMaxIteration<State>where
State: Freeze,
impl<State> RefUnwindSafe for ReachMaxIteration<State>where
State: RefUnwindSafe,
impl<State> Send for ReachMaxIteration<State>where
State: Send,
impl<State> Sync for ReachMaxIteration<State>where
State: Sync,
impl<State> Unpin for ReachMaxIteration<State>where
State: Unpin,
impl<State> UnwindSafe for ReachMaxIteration<State>where
State: UnwindSafe,
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