[−][src]Struct chalk_ir::Canonical
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]
&'a self,
interner: &'a T::Interner
) -> CanonicalDisplay<'a, T>
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]
T: CastTo<U> + HasInterner,
U: HasInterner<Interner = T::Interner>,
impl<T: Clone + HasInterner> Clone for Canonical<T> where
T::Interner: Clone,
[src]
T::Interner: Clone,
impl<T: Debug + HasInterner> Debug for Canonical<T> where
T::Interner: Debug,
[src]
T::Interner: Debug,
impl<T: Eq + HasInterner> Eq for Canonical<T> where
T::Interner: Eq,
[src]
T::Interner: Eq,
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]
I: Interner,
T: HasInterner<Interner = I> + Fold<I, TI>,
<T as Fold<I, TI>>::Result: HasInterner<Interner = TI>,
TI: TargetInterner<I>,
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
fn fold_with<'i>(
&self,
folder: &mut dyn Folder<'i, I, TI>,
outer_binder: DebruijnIndex
) -> Fallible<Self::Result> where
I: 'i,
TI: 'i,
[src]
&self,
folder: &mut dyn Folder<'i, I, TI>,
outer_binder: DebruijnIndex
) -> Fallible<Self::Result> where
I: 'i,
TI: 'i,
impl<T: HasInterner> HasInterner for Canonical<T>
[src]
impl<T: Hash + HasInterner> Hash for Canonical<T> where
T::Interner: Hash,
[src]
T::Interner: Hash,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: PartialEq + HasInterner> PartialEq<Canonical<T>> for Canonical<T> where
T::Interner: PartialEq,
[src]
T::Interner: PartialEq,
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]
I: Interner,
T: HasInterner<Interner = I> + Visit<I>,
fn visit_with<'i, R: VisitResult>(
&self,
visitor: &mut dyn Visitor<'i, I, Result = R>,
outer_binder: DebruijnIndex
) -> R where
I: 'i,
[src]
&self,
visitor: &mut dyn Visitor<'i, I, Result = R>,
outer_binder: DebruijnIndex
) -> R where
I: 'i,
Auto Trait Implementations
impl<T> RefUnwindSafe for Canonical<T> where
T: RefUnwindSafe,
<<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: RefUnwindSafe,
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,
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,
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,
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,
T: UnwindSafe,
<<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
[src]
fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
Self: CastTo<U>,
U: HasInterner,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, I> Shift<I> for T where
I: Interner,
T: Fold<I, I>,
[src]
I: Interner,
T: Fold<I, I>,
fn shifted_in(&Self, &I) -> <T as Fold<I, I>>::Result
[src]
fn shifted_in_from(&Self, &I, DebruijnIndex) -> <T as Fold<I, I>>::Result
[src]
fn shifted_out_to(
&Self,
&I,
DebruijnIndex
) -> Result<<T as Fold<I, I>>::Result, NoSolution>
[src]
&Self,
&I,
DebruijnIndex
) -> Result<<T as Fold<I, I>>::Result, NoSolution>
fn shifted_out(&Self, &I) -> Result<<T as Fold<I, I>>::Result, NoSolution>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, I> VisitExt<I> for T where
I: Interner,
T: Visit<I>,
[src]
I: Interner,
T: Visit<I>,