pub struct SolutionCallbackArguments<'a, 'b> {
pub solution: &'b Solution,
/* private fields */
}Expand description
The input which is passed to the solution callback (which can be set using
Solver::with_solution_callback).
Provides direct access to the solution via SolutionCallbackArguments::solution and allows
logging the statistics of the Solver using SolutionCallbackArguments::log_statistics.
Fields§
§solution: &'b SolutionThe solution which has been found
Implementations§
Source§impl<'a, 'b> SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> SolutionCallbackArguments<'a, 'b>
Sourcepub fn log_statistics(&self)
pub fn log_statistics(&self)
Log the statistics of the Solver.
If the solution was found using Solver::minimise or Solver::maximise then the
objective value of the current solution is included in the statistics.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> Freeze for SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> !Send for SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> !Sync for SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> Unpin for SolutionCallbackArguments<'a, 'b>
impl<'a, 'b> !UnwindSafe for SolutionCallbackArguments<'a, 'b>
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> 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