[][src]Struct chalk_ir::Canonical

pub struct Canonical<T: HasInterner> {
    pub value: T,
    pub binders: CanonicalVarKinds<T::Interner>,
}

Wraps a "canonicalized item". Items are canonicalized as follows:

All unresolved existential variables are "renumbered" according to their first appearance; the kind/universe of the variable is recorded in the binders field.

Fields

value: T

The item that is canonicalized.

binders: CanonicalVarKinds<T::Interner>

The kind/universe of the variable.

Implementations

impl<T: HasInterner + Display> Canonical<T>[src]

pub fn display<'a>(
    &'a self,
    interner: &'a T::Interner
) -> CanonicalDisplay<'a, T>
[src]

Display the canonicalized item.

Trait Implementations

impl<T, U> CastTo<Canonical<U>> for Canonical<T> where
    T: CastTo<U> + HasInterner,
    U: HasInterner<Interner = T::Interner>, 
[src]

impl<T: Clone + HasInterner> Clone for Canonical<T> where
    T::Interner: Clone
[src]

impl<T: Debug + HasInterner> Debug for Canonical<T> where
    T::Interner: Debug
[src]

impl<T: Eq + HasInterner> Eq for Canonical<T> where
    T::Interner: Eq
[src]

impl<I, T, TI> Fold<I, TI> for Canonical<T> where
    I: Interner,
    T: HasInterner<Interner = I> + Fold<I, TI>,
    <T as Fold<I, TI>>::Result: HasInterner<Interner = TI>,
    TI: TargetInterner<I>, 
[src]

type Result = Canonical<T::Result>

The type of value that will be produced once folding is done. Typically this is Self, unless Self contains borrowed values, in which case owned values are produced (for example, one can fold over a &T value where T: Fold, in which case you get back a T, not a &T). Read more

impl<T: HasInterner> HasInterner for Canonical<T>[src]

type Interner = T::Interner

The interner associated with the type.

impl<T: Hash + HasInterner> Hash for Canonical<T> where
    T::Interner: Hash
[src]

impl<T: PartialEq + HasInterner> PartialEq<Canonical<T>> for Canonical<T> where
    T::Interner: PartialEq
[src]

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

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

impl<I, T> Visit<I> for Canonical<T> where
    I: Interner,
    T: HasInterner<Interner = I> + Visit<I>, 
[src]

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Canonical<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, I> Shift<I> for T where
    I: Interner,
    T: Fold<I, I>, 
[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<T, I> VisitExt<I> for T where
    I: Interner,
    T: Visit<I>, 
[src]