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: i32Trait Implementations§
Source§impl AtomicConstraint for TestAtomic
impl AtomicConstraint for TestAtomic
Source§type Identifier = &'static str
type Identifier = &'static str
The type of identifier used for variables.
Source§fn identifier(&self) -> Self::Identifier
fn identifier(&self) -> Self::Identifier
The identifier of this atomic constraint.
Source§fn comparison(&self) -> Comparison
fn comparison(&self) -> Comparison
The
Comparison used for this atomic constraint.Source§impl CheckerVariable<TestAtomic> for &'static str
impl CheckerVariable<TestAtomic> for &'static str
Source§fn does_atomic_constrain_self(&self, atomic: &TestAtomic) -> bool
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
fn atomic_less_than(&self, value: i32) -> TestAtomic
Get the atomic constraint
[self <= value].Source§fn atomic_greater_than(&self, value: i32) -> TestAtomic
fn atomic_greater_than(&self, value: i32) -> TestAtomic
Get the atomic constraint
[self <= value].Source§fn atomic_equal(&self, value: i32) -> TestAtomic
fn atomic_equal(&self, value: i32) -> TestAtomic
Get the atomic constraint
[self == value].Source§fn atomic_not_equal(&self, value: i32) -> TestAtomic
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
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
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>
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
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> + 'statewhere
'this: 'state,
fn induced_holes<'this, 'state>(
&'this self,
variable_state: &'state VariableState<TestAtomic>,
) -> impl Iterator<Item = i32> + 'statewhere
'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,
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
impl Clone for TestAtomic
Source§fn clone(&self) -> TestAtomic
fn clone(&self) -> TestAtomic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestAtomic
impl Debug for TestAtomic
Source§impl PartialEq for TestAtomic
impl PartialEq for TestAtomic
impl Copy for TestAtomic
impl StructuralPartialEq for TestAtomic
Auto Trait Implementations§
impl Freeze for TestAtomic
impl RefUnwindSafe for TestAtomic
impl Send for TestAtomic
impl Sync for TestAtomic
impl Unpin for TestAtomic
impl UnwindSafe for TestAtomic
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