pub struct State<S: UserState> { /* private fields */ }Expand description
The state of the [trellis] solver
This contains generic fields common to all solvers, as well as a user-defined state
S which contains application specific fields.
Implementations§
Source§impl<S> State<S>
impl<S> State<S>
Sourcepub fn terminate_due_to(self, reason: Cause) -> Self
pub fn terminate_due_to(self, reason: Cause) -> Self
Terminates the solver for Cause
Sourcepub fn take_specific(&mut self) -> S
pub fn take_specific(&mut self) -> S
Removes the specific state from the state and returns it
Sourcepub fn relative_tolerance(self, relative_tolerance: S::Float) -> Self
pub fn relative_tolerance(self, relative_tolerance: S::Float) -> Self
Set the relative tolerance target
Sourcepub fn absolute_tolerance(self, absolute_tolerance: S::Float) -> Self
pub fn absolute_tolerance(self, absolute_tolerance: S::Float) -> Self
Set the relative tolerance target
Sourcepub fn set_specific(self, specific: S) -> Self
pub fn set_specific(self, specific: S) -> Self
Set the internal state object
Auto Trait Implementations§
impl<S> Freeze for State<S>
impl<S> RefUnwindSafe for State<S>
impl<S> Send for State<S>
impl<S> Sync for State<S>
impl<S> Unpin for State<S>
impl<S> UnwindSafe for State<S>
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