[][src]Enum gf::support::lattice::FlatLattice

pub enum FlatLattice<T> {
    Bottom,
    Top,
    Value(T),
}

Lattice constructed from a set by adding dedicated bottom and top elements.

Variants

Bottom

Dedicated bottom element, ⊥.

Top

Dedicated top element, ⊤.

Value(T)

Normal element.

Methods

impl<T> FlatLattice<T>[src]

pub fn as_ref(&self) -> FlatLattice<&T>[src]

Convert from a &FlatLattice<T> to FlatLattice<&T>.

pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> FlatLattice<U>[src]

Map normal elements using f, while preserving dedicated bottom and top elements.

pub fn and_then<U, F: FnOnce(T) -> FlatLattice<U>>(self, f: F) -> FlatLattice<U>[src]

Map normal elements using f which may also return bottom or top, while preserving bottom and top elements.

impl<'_, T: Clone> FlatLattice<&'_ T>[src]

pub fn cloned(self) -> FlatLattice<T>[src]

Convert from a FlatLattice<&T> to FlatLattice<T> by cloning the element.

Trait Implementations

impl<T: Clone + Eq> Lattice for FlatLattice<T>[src]

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

impl<T: Clone> Clone for FlatLattice<T>[src]

impl<T: Copy> Copy for FlatLattice<T>[src]

impl<T: Eq> Eq for FlatLattice<T>[src]

impl<T: PartialEq> PartialEq<FlatLattice<T>> for FlatLattice<T>[src]

impl<T: Debug> Debug for FlatLattice<T>[src]

impl<T: Hash> Hash for FlatLattice<T>[src]

impl<T> StructuralPartialEq for FlatLattice<T>[src]

impl<T> StructuralEq for FlatLattice<T>[src]

Auto Trait Implementations

impl<T> Send for FlatLattice<T> where
    T: Send

impl<T> Sync for FlatLattice<T> where
    T: Sync

impl<T> Unpin for FlatLattice<T> where
    T: Unpin

impl<T> UnwindSafe for FlatLattice<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for FlatLattice<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]