Enum resolution_prover::ClausePart [−][src]
A term or negated term that is part of a clause.
For example, p and ~q can be represented as the following.
let p = resolution_prover::ClausePart::Term("p".to_string()); let not_q = resolution_prover::ClausePart::NegatedTerm("q".to_string());
Variants
Term(String)NegatedTerm(String)
Methods
impl ClausePart[src]
impl ClausePartpub fn negate(&self) -> ClausePart[src]
pub fn negate(&self) -> ClausePartReturns the negated version of the clause part.
let clausePart = resolution_prover::ClausePart::Term("p".to_string()); let neg = clausePart.negate(); let expected_1 = resolution_prover::ClausePart::NegatedTerm("p".to_string()); assert_eq!(neg, expected_1); let double_neg = neg.negate(); assert_eq!(double_neg, clausePart);
Trait Implementations
impl Clone for ClausePart[src]
impl Clone for ClausePartfn clone(&self) -> ClausePart[src]
fn clone(&self) -> ClausePartReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for ClausePart[src]
impl Debug for ClausePartfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for ClausePart[src]
impl Eq for ClausePartimpl Hash for ClausePart[src]
impl Hash for ClausePartfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for ClausePart[src]
impl PartialEq for ClausePartfn eq(&self, other: &ClausePart) -> bool[src]
fn eq(&self, other: &ClausePart) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ClausePart) -> bool[src]
fn ne(&self, other: &ClausePart) -> boolThis method tests for !=.
Auto Trait Implementations
impl Send for ClausePart
impl Send for ClausePartimpl Sync for ClausePart
impl Sync for ClausePart