[][src]Struct chalk_ir::UCanonical

pub struct UCanonical<T: HasInterner> {
    pub canonical: Canonical<T>,
    pub universes: usize,
}

A "universe canonical" value. This is a wrapper around a Canonical, indicating that the universes within have been "renumbered" to start from 0 and collapse unimportant distinctions.

To produce one of these values, use the u_canonicalize method.

Fields

canonical: Canonical<T>

The wrapped Canonical.

universes: usize

The number of universes that have been collapsed.

Implementations

impl<T: HasInterner> UCanonical<T>[src]

pub fn is_trivial_substitution(
    &self,
    interner: &T::Interner,
    canonical_subst: &Canonical<AnswerSubst<T::Interner>>
) -> bool
[src]

Checks whether the universe canonical value is a trivial substitution (e.g. an identity substitution).

pub fn trivial_substitution(
    &self,
    interner: &T::Interner
) -> Substitution<T::Interner>
[src]

Creates an identity substitution.

Trait Implementations

impl<T: Clone + HasInterner> Clone for UCanonical<T>[src]

impl<T: Debug + HasInterner> Debug for UCanonical<T>[src]

impl<T: Eq + HasInterner> Eq for UCanonical<T>[src]

impl<T: Hash + HasInterner> Hash for UCanonical<T>[src]

impl<T: PartialEq + HasInterner> PartialEq<UCanonical<T>> for UCanonical<T>[src]

impl<T: HasInterner> StructuralEq for UCanonical<T>[src]

impl<T: HasInterner> StructuralPartialEq for UCanonical<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for UCanonical<T> where
    T: RefUnwindSafe,
    <<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: RefUnwindSafe

impl<T> Send for UCanonical<T> where
    T: Send,
    <<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: Send

impl<T> Sync for UCanonical<T> where
    T: Sync,
    <<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: Sync

impl<T> Unpin for UCanonical<T> where
    T: Unpin,
    <<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: Unpin

impl<T> UnwindSafe for UCanonical<T> where
    T: UnwindSafe,
    <<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: 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> Cast for T[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.