pub struct RuleResult {
pub continue_search: bool,
pub modified_bound: Option<f64>,
pub reason: Reason,
pub optimal: Option<bool>,
pub leaf: Option<bool>,
}Expand description
What a rule decided for a node.
Fields§
§continue_search: boolWhether the search goes on below the node.
modified_bound: Option<f64>A new upper bound to record on the node, if any.
reason: ReasonWhy the search stops, when it does.
optimal: Option<bool>Mark the node as solved optimally.
leaf: Option<bool>Turn the node into a leaf.
Implementations§
Source§impl RuleResult
impl RuleResult
Sourcepub fn continue_search() -> Self
pub fn continue_search() -> Self
Lets the search continue.
Sourcepub fn stop_search(reason: Reason) -> Self
pub fn stop_search(reason: Reason) -> Self
Stops the search at the node.
Sourcepub fn stop_with_bound(bound: f64, reason: Reason) -> Self
pub fn stop_with_bound(bound: f64, reason: Reason) -> Self
Stops the search at the node and records bound as its upper bound.
Sourcepub fn with_reason(self, reason: Reason) -> Self
pub fn with_reason(self, reason: Reason) -> Self
Replaces the reason.
Trait Implementations§
Source§impl Clone for RuleResult
impl Clone for RuleResult
Source§fn clone(&self) -> RuleResult
fn clone(&self) -> RuleResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuleResult
impl RefUnwindSafe for RuleResult
impl Send for RuleResult
impl Sync for RuleResult
impl Unpin for RuleResult
impl UnsafeUnpin for RuleResult
impl UnwindSafe for RuleResult
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