Struct chalk_ir::UCanonical
source · [−]pub struct UCanonical<T: HasInterner> {
pub canonical: Canonical<T>,
pub universes: usize,
}
Expand description
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
sourceimpl<T: HasInterner> UCanonical<T>
impl<T: HasInterner> UCanonical<T>
sourcepub fn is_trivial_substitution(
&self,
interner: T::Interner,
canonical_subst: &Canonical<AnswerSubst<T::Interner>>
) -> bool
pub fn is_trivial_substitution(
&self,
interner: T::Interner,
canonical_subst: &Canonical<AnswerSubst<T::Interner>>
) -> bool
Checks whether the universe canonical value is a trivial substitution (e.g. an identity substitution).
sourcepub fn trivial_substitution(
&self,
interner: T::Interner
) -> Substitution<T::Interner>
pub fn trivial_substitution(
&self,
interner: T::Interner
) -> Substitution<T::Interner>
Creates an identity substitution.
Trait Implementations
sourceimpl<T: Clone + HasInterner> Clone for UCanonical<T>
impl<T: Clone + HasInterner> Clone for UCanonical<T>
sourcefn clone(&self) -> UCanonical<T>
fn clone(&self) -> UCanonical<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 moresourceimpl<T: Debug + HasInterner> Debug for UCanonical<T>
impl<T: Debug + HasInterner> Debug for UCanonical<T>
sourceimpl<T: Hash + HasInterner> Hash for UCanonical<T>
impl<T: Hash + HasInterner> Hash for UCanonical<T>
sourceimpl<T: PartialEq + HasInterner> PartialEq<UCanonical<T>> for UCanonical<T>
impl<T: PartialEq + HasInterner> PartialEq<UCanonical<T>> for UCanonical<T>
sourcefn eq(&self, other: &UCanonical<T>) -> bool
fn eq(&self, other: &UCanonical<T>) -> bool
impl<T: Eq + HasInterner> Eq for UCanonical<T>
impl<T: HasInterner> StructuralEq for UCanonical<T>
impl<T: HasInterner> StructuralPartialEq for UCanonical<T>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Cast for T
impl<T> Cast for T
sourcefn cast<U>(self, interner: U::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: U::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.