Struct chalk_ir::UCanonical [−][src]
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
impl<T: HasInterner> UCanonical<T>
[src]
impl<T: HasInterner> UCanonical<T>
[src]pub fn is_trivial_substitution(
&self,
interner: &T::Interner,
canonical_subst: &Canonical<AnswerSubst<T::Interner>>
) -> bool
[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]
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: Clone + HasInterner> Clone for UCanonical<T>
[src]fn clone(&self) -> UCanonical<T>
[src]
fn clone(&self) -> UCanonical<T>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<T: Debug + HasInterner> Debug for UCanonical<T>
[src]
impl<T: Debug + HasInterner> Debug for UCanonical<T>
[src]impl<T: Hash + HasInterner> Hash 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: PartialEq + HasInterner> PartialEq<UCanonical<T>> for UCanonical<T>
[src]fn eq(&self, other: &UCanonical<T>) -> bool
[src]
fn eq(&self, other: &UCanonical<T>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &UCanonical<T>) -> bool
[src]
fn ne(&self, other: &UCanonical<T>) -> bool
[src]This method tests for !=
.
impl<T: Eq + HasInterner> Eq 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,
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,
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,
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,
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,
T: UnwindSafe,
<<T as HasInterner>::Interner as Interner>::InternedCanonicalVarKinds: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Cast for T
[src]
impl<T> Cast for T
[src]fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]Cast a value to type U
using CastTo
.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more