Skip to main content

TestAtomic

Struct TestAtomic 

Source
pub struct TestAtomic {
    pub name: &'static str,
    pub comparison: Comparison,
    pub value: i32,
}
Expand description

A simple implementation of an AtomicConstraint.

Fields§

§name: &'static str§comparison: Comparison§value: i32

Trait Implementations§

Source§

impl AtomicConstraint for TestAtomic

Source§

type Identifier = &'static str

The type of identifier used for variables.
Source§

fn identifier(&self) -> Self::Identifier

The identifier of this atomic constraint.
Source§

fn comparison(&self) -> Comparison

The Comparison used for this atomic constraint.
Source§

fn value(&self) -> i32

The value on the right-hand side of this atomic constraint.
Source§

fn negate(&self) -> Self

The strongest atomic constraint that is mutually exclusive with self.
Source§

impl CheckerVariable<TestAtomic> for &'static str

Source§

fn does_atomic_constrain_self(&self, atomic: &TestAtomic) -> bool

Tests whether the given atomic is a statement over the variable self.
Source§

fn atomic_less_than(&self, value: i32) -> TestAtomic

Get the atomic constraint [self <= value].
Source§

fn atomic_greater_than(&self, value: i32) -> TestAtomic

Get the atomic constraint [self <= value].
Source§

fn atomic_equal(&self, value: i32) -> TestAtomic

Get the atomic constraint [self == value].
Source§

fn atomic_not_equal(&self, value: i32) -> TestAtomic

Get the atomic constraint [self != value].
Source§

fn induced_lower_bound( &self, variable_state: &VariableState<TestAtomic>, ) -> IntExt

Get the lower bound of the domain.
Source§

fn induced_upper_bound( &self, variable_state: &VariableState<TestAtomic>, ) -> IntExt

Get the upper bound of the domain.
Source§

fn induced_fixed_value( &self, variable_state: &VariableState<TestAtomic>, ) -> Option<i32>

Get the value the variable is fixed to, if the variable is fixed.
Source§

fn induced_domain_contains( &self, variable_state: &VariableState<TestAtomic>, value: i32, ) -> bool

Returns whether the value is in the domain.
Source§

fn induced_holes<'this, 'state>( &'this self, variable_state: &'state VariableState<TestAtomic>, ) -> impl Iterator<Item = i32> + 'state
where 'this: 'state,

Get the holes in the domain.
Source§

fn iter_induced_domain<'this, 'state>( &'this self, variable_state: &'state VariableState<TestAtomic>, ) -> Option<impl Iterator<Item = i32> + 'state>
where 'this: 'state,

Iterate the domain of the variable. Read more
Source§

impl Clone for TestAtomic

Source§

fn clone(&self) -> TestAtomic

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TestAtomic

Source§

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

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

impl PartialEq for TestAtomic

Source§

fn eq(&self, other: &TestAtomic) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TestAtomic

Source§

impl StructuralPartialEq for TestAtomic

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.