Enum terminus_store::layer::PossiblyResolved
source · [−]pub enum PossiblyResolved<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> {
Unresolved(T),
Resolved(u64),
}Expand description
Either a resolved id or an unresolved inner type.
Variants
Unresolved(T)
Resolved(u64)
Implementations
sourceimpl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PossiblyResolved<T>
impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PossiblyResolved<T>
sourcepub fn is_resolved(&self) -> bool
pub fn is_resolved(&self) -> bool
Returns true if this is a resolved id, and false otherwise.
sourcepub fn as_ref(&self) -> PossiblyResolved<&T>
pub fn as_ref(&self) -> PossiblyResolved<&T>
Return a PossiblyResolved with the inner value as a reference.
sourcepub fn unwrap_unresolved(self) -> T
pub fn unwrap_unresolved(self) -> T
Unwrap to the unresolved inner value, or panic if this was actually a resolved id.
sourcepub fn unwrap_resolved(self) -> u64
pub fn unwrap_resolved(self) -> u64
Unwrap to the resolved id, or panic if this was actually an unresolved value.
Trait Implementations
sourceimpl<T: Clone + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Clone for PossiblyResolved<T>
impl<T: Clone + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Clone for PossiblyResolved<T>
sourcefn clone(&self) -> PossiblyResolved<T>
fn clone(&self) -> PossiblyResolved<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<T: Debug + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Debug for PossiblyResolved<T>
impl<T: Debug + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Debug for PossiblyResolved<T>
sourceimpl<T: Hash + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Hash for PossiblyResolved<T>
impl<T: Hash + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Hash for PossiblyResolved<T>
sourceimpl<T: Ord + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Ord for PossiblyResolved<T>
impl<T: Ord + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Ord for PossiblyResolved<T>
sourceimpl<T: PartialEq + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PartialEq<PossiblyResolved<T>> for PossiblyResolved<T>
impl<T: PartialEq + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PartialEq<PossiblyResolved<T>> for PossiblyResolved<T>
sourcefn eq(&self, other: &PossiblyResolved<T>) -> bool
fn eq(&self, other: &PossiblyResolved<T>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PossiblyResolved<T>) -> bool
fn ne(&self, other: &PossiblyResolved<T>) -> bool
This method tests for !=.
sourceimpl<T: PartialOrd + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PartialOrd<PossiblyResolved<T>> for PossiblyResolved<T>
impl<T: PartialOrd + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> PartialOrd<PossiblyResolved<T>> for PossiblyResolved<T>
sourcefn partial_cmp(&self, other: &PossiblyResolved<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &PossiblyResolved<T>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: Eq + Clone + PartialEq + Eq + PartialOrd + Ord + Hash> Eq for PossiblyResolved<T>
impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> StructuralEq for PossiblyResolved<T>
impl<T: Clone + PartialEq + Eq + PartialOrd + Ord + Hash> StructuralPartialEq for PossiblyResolved<T>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more