pub struct TimeOut<State: IterState> {
pub timeout: Duration,
/* private fields */
}
Expand description
Error indicating that the solver timed out before completing.
This error occurs when the solver exceeds the specified time limit without reaching a termination condition. It contains both the timeout duration and the final state the solver had reached when the timeout occurred.
Fields§
§timeout: Duration
The time limit that was reached.
Implementations§
Source§impl<State: IterState> TimeOut<State>
impl<State: IterState> TimeOut<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: IterState> Error for TimeOut<State>
impl<State: IterState> Error for TimeOut<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 TimeOut<State>where
State: Freeze,
impl<State> RefUnwindSafe for TimeOut<State>where
State: RefUnwindSafe,
impl<State> Send for TimeOut<State>where
State: Send,
impl<State> Sync for TimeOut<State>where
State: Sync,
impl<State> Unpin for TimeOut<State>where
State: Unpin,
impl<State> UnwindSafe for TimeOut<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