Enum chalk_ir::LifetimeData
source · [−]pub enum LifetimeData<I: Interner> {
BoundVar(BoundVar),
InferenceVar(InferenceVar),
Placeholder(PlaceholderIndex),
Static,
Empty(UniverseIndex),
Erased,
Phantom(Void, PhantomData<I>),
}
Expand description
Lifetime data, including what kind of lifetime it is and what it points to.
Variants
BoundVar(BoundVar)
See TyKind::BoundVar.
InferenceVar(InferenceVar)
Lifetime whose value is being inferred.
Placeholder(PlaceholderIndex)
Lifetime on some yet-unknown placeholder.
Static
Static lifetime
Empty(UniverseIndex)
An empty lifetime: a lifetime shorter than any other lifetime in a universe with a lesser or equal index. The universe only non-zero in lexical region resolve in rustc, so chalk shouldn’t ever see a non-zero index.
Erased
An erased lifetime, used by rustc to improve caching when we doesn’t care about lifetimes
Phantom(Void, PhantomData<I>)
Lifetime on phantom data.
Implementations
Trait Implementations
sourceimpl<I: Interner> CastTo<LifetimeData<I>> for LifetimeData<I>
impl<I: Interner> CastTo<LifetimeData<I>> for LifetimeData<I>
sourcefn cast_to(
self,
_interner: <LifetimeData<I> as HasInterner>::Interner
) -> LifetimeData<I>
fn cast_to(
self,
_interner: <LifetimeData<I> as HasInterner>::Interner
) -> LifetimeData<I>
Cast a value to type T
.
sourceimpl<I: Clone + Interner> Clone for LifetimeData<I>
impl<I: Clone + Interner> Clone for LifetimeData<I>
sourcefn clone(&self) -> LifetimeData<I>
fn clone(&self) -> LifetimeData<I>
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 more
sourceimpl<I: Interner> Debug for LifetimeData<I>
impl<I: Interner> Debug for LifetimeData<I>
sourceimpl<I: Interner> HasInterner for LifetimeData<I>
impl<I: Interner> HasInterner for LifetimeData<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for LifetimeData<I>
impl<I: Hash + Interner> Hash for LifetimeData<I>
sourceimpl<I: Ord + Interner> Ord for LifetimeData<I>
impl<I: Ord + Interner> Ord for LifetimeData<I>
sourcefn cmp(&self, other: &LifetimeData<I>) -> Ordering
fn cmp(&self, other: &LifetimeData<I>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<I: PartialEq + Interner> PartialEq<LifetimeData<I>> for LifetimeData<I>
impl<I: PartialEq + Interner> PartialEq<LifetimeData<I>> for LifetimeData<I>
sourcefn eq(&self, other: &LifetimeData<I>) -> bool
fn eq(&self, other: &LifetimeData<I>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LifetimeData<I>) -> bool
fn ne(&self, other: &LifetimeData<I>) -> bool
This method tests for !=
.
sourceimpl<I: PartialOrd + Interner> PartialOrd<LifetimeData<I>> for LifetimeData<I>
impl<I: PartialOrd + Interner> PartialOrd<LifetimeData<I>> for LifetimeData<I>
sourcefn partial_cmp(&self, other: &LifetimeData<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &LifetimeData<I>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<I: Copy + Interner> Copy for LifetimeData<I>
impl<I: Eq + Interner> Eq for LifetimeData<I>
impl<I: Interner> StructuralEq for LifetimeData<I>
impl<I: Interner> StructuralPartialEq for LifetimeData<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for LifetimeData<I> where
I: RefUnwindSafe,
impl<I> Send for LifetimeData<I> where
I: Send,
impl<I> Sync for LifetimeData<I> where
I: Sync,
impl<I> Unpin for LifetimeData<I> where
I: Unpin,
impl<I> UnwindSafe for LifetimeData<I> where
I: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.