[][src]Struct pergola::MinOpt

pub struct MinOpt<M> { /* fields omitted */ }

This lattice is similar to MaxDef but inverts the order, with the minimal value according to Ord::cmp as its join, and the unit being a putative "maximal" value of the element type. Since several Ord types do not have a maximal value (think strings, maps, etc.) MinOpt represents its element using an Option where None is the "maximal" value (that forms the lattice unit) and Some(M) is for the rest.

Note this may not be quite what you want if your type does have a maximal element. For example this will make the unit of u32 still be None, not u32::MAX. For those, use MinNum. Both are safe, but MinOpt is weird in those cases.

Trait Implementations

impl<M: Debug> Debug for MinOpt<M>[src]

impl<M: Ord + Clone> LatticeDef for MinOpt<M>[src]

type T = Option<M>

Auto Trait Implementations

impl<M> RefUnwindSafe for MinOpt<M> where
    M: RefUnwindSafe

impl<M> Send for MinOpt<M> where
    M: Send

impl<M> Sync for MinOpt<M> where
    M: Sync

impl<M> Unpin for MinOpt<M> where
    M: Unpin

impl<M> UnwindSafe for MinOpt<M> where
    M: UnwindSafe

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.