[][src]Struct pergola::MinOpt

pub struct MinOpt<M: DefTraits> { /* 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 is for the other non-unit values.

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 std::u32::MAX. For those, use MinNum. Both are safe, but MinOpt is weird in those cases.

Trait Implementations

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

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

impl<M: Default + DefTraits> Default for MinOpt<M>[src]

impl<'de, M: DefTraits> Deserialize<'de> for MinOpt<M>[src]

impl<M: Eq + DefTraits> Eq for MinOpt<M>[src]

impl<M: Hash + DefTraits> Hash for MinOpt<M>[src]

impl<M: DefTraits> LatticeDef for MinOpt<M>[src]

type T = Option<M>

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

impl<M: PartialEq + DefTraits> PartialEq<MinOpt<M>> for MinOpt<M>[src]

impl<M: PartialOrd + DefTraits> PartialOrd<MinOpt<M>> for MinOpt<M>[src]

impl<M: DefTraits> Serialize for MinOpt<M>[src]

impl<M: DefTraits> StructuralEq for MinOpt<M>[src]

impl<M: DefTraits> StructuralPartialEq for MinOpt<M>[src]

Auto Trait Implementations

impl<M> RefUnwindSafe for MinOpt<M> where
    M: RefUnwindSafe
[src]

impl<M> Send for MinOpt<M> where
    M: Send
[src]

impl<M> Sync for MinOpt<M> where
    M: Sync
[src]

impl<M> Unpin for MinOpt<M> where
    M: Unpin
[src]

impl<M> UnwindSafe for MinOpt<M> where
    M: UnwindSafe
[src]

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.