[][src]Struct rate_common::clause::Reason

pub struct Reason(_);

The reason for assigning a literal

A literal can be assumed, or forced by some clause. The clause is stored as offset to reduce the number of indirections in propagate.

This is essentially this enum, but we pack everything into size_of::<usize>() bits.

enum Reason {
    Assumed,
    Forced(usize),
}

Methods

impl Reason[src]

pub fn invalid() -> Reason[src]

Create an invalid reason, i.e. for unassigned literals.

pub fn assumed() -> Reason[src]

Create a reason for assumed literals.

pub fn forced(offset: usize) -> Reason[src]

Create a reason for a clause that has been forced by the clause with the given offset.

pub fn is_assumed(self) -> bool[src]

Return true when this is an assumption.

pub fn offset(self) -> usize[src]

Return the offset of the clause. Only valid if this is not an assumption or invalid.

Trait Implementations

impl Clone for Reason[src]

impl Copy for Reason[src]

impl Default for Reason[src]

impl Eq for Reason[src]

impl PartialEq<Reason> for Reason[src]

impl Display for Reason[src]

impl Debug for Reason[src]

Auto Trait Implementations

impl Send for Reason

impl Sync for Reason

impl Unpin for Reason

impl UnwindSafe for Reason

impl RefUnwindSafe for Reason

Blanket Implementations

impl<T> HeapSpace for T where
    T: Copy
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]