[−][src]Struct rate_common::clause::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]
T: Copy,
fn heap_space(&Self) -> usize
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,