Enum splr::solver::Certificate
source · pub enum Certificate {
SAT(Vec<i32>),
UNSAT,
}
Expand description
Normal results returned by Solver.
Variants§
SAT(Vec<i32>)
It is satisfiable; vec
is such an assignment sorted by var order.
UNSAT
It is unsatisfiable.
Trait Implementations§
source§impl Debug for Certificate
impl Debug for Certificate
source§impl PartialEq for Certificate
impl PartialEq for Certificate
source§fn eq(&self, other: &Certificate) -> bool
fn eq(&self, other: &Certificate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<V: AsRef<[i32]>> TryFrom<Vec<V>> for Certificate
impl<V: AsRef<[i32]>> TryFrom<Vec<V>> for Certificate
Example
use crate::splr::*;
let v: Vec<Vec<i32>> = vec![];
assert!(matches!(
Certificate::try_from(v),
Ok(Certificate::SAT(_))
));
assert!(matches!(
Certificate::try_from(vec![vec![0_i32]]),
Err(SolverError::InvalidLiteral)
));
// `Solver` has another interface.
assert!(matches!(
Solver::try_from((Config::default(), vec![vec![0_i32]].as_ref())),
Err(Err(SolverError::InvalidLiteral))
));
§type Error = SolverError
type Error = SolverError
The type returned in the event of a conversion error.
source§fn try_from(vec: Vec<V>) -> SolverResult
fn try_from(vec: Vec<V>) -> SolverResult
Performs the conversion.
impl Eq for Certificate
impl StructuralPartialEq for Certificate
Auto Trait Implementations§
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
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