Skip to main content

UsableNodeRule

Struct UsableNodeRule 

Source
pub struct UsableNodeRule { /* private fields */ }
Expand description

Stops at nodes already solved in an earlier visit: their error and the bound they were solved under are both known. Always active.

Implementations§

Source§

impl UsableNodeRule

Source

pub fn new() -> Self

A new rule.

Trait Implementations§

Source§

impl Debug for UsableNodeRule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UsableNodeRule

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Rule for UsableNodeRule

Source§

fn evaluate(&self, context: &RuleContext) -> RuleResult

Decides whether the search continues below the node.
Source§

fn priority(&self) -> u8

Rules with a higher priority are evaluated first.
Source§

fn description(&self) -> String

A short human-readable name.
Source§

fn state(&self) -> RuleState

The current state of the rule.
Source§

fn is_relaxable(&self) -> bool

Whether the rule restricts the search only temporarily. A search whose pass was cut by a relaxable rule is not finished.
Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Mutable upcast used by RuleManager::get_rule_mut.
Source§

fn is_active(&self) -> bool

Whether the rule is applied.
Source§

fn activate(&mut self)

Starts applying the rule; called before the first pass.
Source§

fn deactivate(&mut self)

Stops applying the rule.
Source§

fn relax(&mut self)

Widens the rule’s budget before the next pass, or deactivates it once the budget is at its limit.
Source§

fn reset(&mut self)

Resets any internal state, such as a timer.
Source§

fn delay(&self) -> u8

Number of passes to wait before the rule takes effect.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.