Skip to main content

AtomicConstraint

Trait AtomicConstraint 

Source
pub trait AtomicConstraint: Sized + Debug {
    type Identifier: Hash + Eq;

    // Required methods
    fn identifier(&self) -> Self::Identifier;
    fn comparison(&self) -> Comparison;
    fn value(&self) -> i32;
    fn negate(&self) -> Self;
}
Expand description

Captures the data associated with an atomic constraint.

An atomic constraint has the form [identifier op value], where:

  • identifier identifies a variable,
  • op is a Comparison,
  • and value is an integer.

Required Associated Types§

Source

type Identifier: Hash + Eq

The type of identifier used for variables.

Required Methods§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§