pub struct ProblemChangeReceiver<S: PlanningSolution> { /* private fields */ }Expand description
Receiver for problem changes, used by the solver.
Implementations§
Source§impl<S: PlanningSolution> ProblemChangeReceiver<S>
impl<S: PlanningSolution> ProblemChangeReceiver<S>
Sourcepub fn try_recv(&self) -> Option<BoxedProblemChange<S>>
pub fn try_recv(&self) -> Option<BoxedProblemChange<S>>
Tries to receive a pending problem change without blocking.
Returns Some(change) if a change is available, None otherwise.
Sourcepub fn drain_pending(&self) -> Vec<BoxedProblemChange<S>> ⓘ
pub fn drain_pending(&self) -> Vec<BoxedProblemChange<S>> ⓘ
Receives all pending problem changes without blocking.
Returns a vector of all queued changes.
Sourcepub fn is_terminate_early_requested(&self) -> bool
pub fn is_terminate_early_requested(&self) -> bool
Returns true if early termination has been requested.
Sourcepub fn set_solving(&self, solving: bool)
pub fn set_solving(&self, solving: bool)
Sets the solving flag.
Sourcepub fn clear_terminate_early(&self)
pub fn clear_terminate_early(&self)
Clears the terminate early flag.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ProblemChangeReceiver<S>
impl<S> RefUnwindSafe for ProblemChangeReceiver<S>
impl<S> Send for ProblemChangeReceiver<S>
impl<S> !Sync for ProblemChangeReceiver<S>
impl<S> Unpin for ProblemChangeReceiver<S>
impl<S> UnwindSafe for ProblemChangeReceiver<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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