Enum tribool::Tribool [] [src]

pub enum Tribool {
    True,
    False,
    Indeterminate,
}

Three-state Boolean logic

Variants

Truth value

False value

Unknown/Indeterminate value

Methods

impl Tribool
[src]

[src]

Returns true only if self is True

[src]

Returns true only if self is False

[src]

Returns true only if self is Indeterminate

[src]

Checks for equality of two Tribools, returning Indeterminate if either are indeterminate.

[src]

Checks for inequality of two Tribools, returning Indeterminate if either are indeterminate.

[src]

Material implication using Kleene Logic.

This is equivalent to NOT(A) OR B.

[src]

Material implication using Łukasiewicz Logic

The Łukasiewicz Ł3 has the same tables for AND, OR, and NOT as the Kleene logic used elsewhere, but differs in its definition of implication in that "unknown implies unknown" is true.

For more information, see the Wikipedia page and the section on Łukasiewicz Logic

Trait Implementations

impl Debug for Tribool
[src]

[src]

Formats the value using the given formatter.

impl Clone for Tribool
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Tribool
[src]

impl Hash for Tribool
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for Tribool
[src]

[src]

Returns the "default value" for a type. Read more

impl FromStr for Tribool
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl Display for Tribool
[src]

[src]

Formats the value using the given formatter. Read more

impl<B: Into<Tribool> + Copy> PartialEq<B> for Tribool
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<B: Into<Tribool> + Copy> PartialOrd<B> for Tribool
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Not for Tribool
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl<B: Into<Tribool>> BitAnd<B> for Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<B: Into<Tribool>> BitOr<B> for Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<B: Into<Tribool>> BitXor<B> for Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<B: Into<Tribool>> BitAndAssign<B> for Tribool
[src]

[src]

Performs the &= operation.

impl<B: Into<Tribool>> BitOrAssign<B> for Tribool
[src]

[src]

Performs the |= operation.

impl<B: Into<Tribool>> BitXorAssign<B> for Tribool
[src]

[src]

Performs the ^= operation.

impl From<bool> for Tribool
[src]

[src]

Performs the conversion.

impl<'a> Not for &'a Tribool
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl<'a> BitAnd<Tribool> for &'a Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitAnd<&'a Tribool> for Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, 'b> BitAnd<&'a Tribool> for &'b Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitOr<Tribool> for &'a Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitOr<&'a Tribool> for Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, 'b> BitOr<&'a Tribool> for &'b Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitXor<Tribool> for &'a Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> BitXor<&'a Tribool> for Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a, 'b> BitXor<&'a Tribool> for &'b Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> BitAnd<bool> for &'a Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitAnd<&'a bool> for Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, 'b> BitAnd<&'a bool> for &'b Tribool
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitOr<bool> for &'a Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitOr<&'a bool> for Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, 'b> BitOr<&'a bool> for &'b Tribool
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitXor<bool> for &'a Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> BitXor<&'a bool> for Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a, 'b> BitXor<&'a bool> for &'b Tribool
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.