pub enum DimacsError {
MissingHeader,
MalformedHeader(String),
VarOutOfRange {
var: i64,
num_vars: usize,
},
InvalidToken(String),
UnterminatedClause,
}Expand description
Why a DIMACS input was rejected. Better a typed error than a silently wrong formula.
Variants§
MissingHeader
Clause data appeared before any p cnf … header (or no header at all).
MalformedHeader(String)
A header line was present but was not p cnf <nat> <nat>.
VarOutOfRange
A literal named var, whose magnitude exceeds the declared num_vars.
InvalidToken(String)
A non-integer token appeared in the clause body.
UnterminatedClause
The input ended mid-clause: literals with no terminating 0.
Trait Implementations§
Source§impl Clone for DimacsError
impl Clone for DimacsError
Source§fn clone(&self) -> DimacsError
fn clone(&self) -> DimacsError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DimacsError
impl Debug for DimacsError
Source§impl PartialEq for DimacsError
impl PartialEq for DimacsError
Source§fn eq(&self, other: &DimacsError) -> bool
fn eq(&self, other: &DimacsError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DimacsError
impl StructuralPartialEq for DimacsError
Auto Trait Implementations§
impl Freeze for DimacsError
impl RefUnwindSafe for DimacsError
impl Send for DimacsError
impl Sync for DimacsError
impl Unpin for DimacsError
impl UnsafeUnpin for DimacsError
impl UnwindSafe for DimacsError
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