[][src]Enum terminus_store::layer::PossiblyResolved

pub enum PossiblyResolved<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> {
    Unresolved(T),
    Resolved(u64),
}

Either a resolved id or an unresolved inner type.

Variants

Unresolved(T)
Resolved(u64)

Implementations

impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PossiblyResolved<T>[src]

pub fn is_resolved(&self) -> bool[src]

Returns true if this is a resolved id, and false otherwise.

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

Return a PossiblyResolved with the inner value as a reference.

pub fn unwrap_unresolved(self) -> T[src]

Unwrap to the unresolved inner value, or panic if this was actually a resolved id.

pub fn unwrap_resolved(self) -> u64[src]

Unwrap to the resolved id, or panic if this was actually an unresolved value.

Trait Implementations

impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Clone for PossiblyResolved<T>[src]

impl<T: Debug + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Debug for PossiblyResolved<T>[src]

impl<T: Eq + Clone + PartialEq + PartialOrd + Ord + Hash> Eq for PossiblyResolved<T>[src]

impl<T: Hash + Clone + PartialEq + Eq + PartialOrd + Ord> Hash for PossiblyResolved<T>[src]

impl<T: Ord + Clone + PartialEq + Eq + PartialOrd + Hash> Ord for PossiblyResolved<T>[src]

impl<T: PartialEq + Clone + Eq + PartialOrd + Ord + Hash> PartialEq<PossiblyResolved<T>> for PossiblyResolved<T>[src]

impl<T: PartialOrd + Clone + PartialEq + Eq + Ord + Hash> PartialOrd<PossiblyResolved<T>> for PossiblyResolved<T>[src]

impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> StructuralEq for PossiblyResolved<T>[src]

impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> StructuralPartialEq for PossiblyResolved<T>[src]

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for PossiblyResolved<T> where
    T: 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> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,