pub trait Dimacs: Copy + Eq {
const MAX_DIMACS: isize;
// Required methods
fn from_dimacs(value: isize) -> Self;
fn dimacs(self) -> isize;
}
Expand description
Type that can be used to represent literals and variables in DIMACS CNF and related file formats.
Required Associated Constants§
Sourceconst MAX_DIMACS: isize
const MAX_DIMACS: isize
Largest literal / variable supported.
Required Methods§
Sourcefn from_dimacs(value: isize) -> Self
fn from_dimacs(value: isize) -> Self
Returns a literal / variable that is encoded as the passed integer in the DIMACS CNF format.
If the value is out of range, e.g. negative for a variable, this may panic or return an arbitrary value.
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.