[][src]Struct chalk_ir::PlaceholderIndex

pub struct PlaceholderIndex {
    pub ui: UniverseIndex,
    pub idx: usize,
}

Index of an universally quantified parameter in the environment. Two indexes are required, the one of the universe itself and the relative index inside the universe.

Fields

ui: UniverseIndex

Index of the universe.

idx: usize

Index in the universe.

Implementations

impl PlaceholderIndex[src]

pub fn to_lifetime<I: Interner>(self, interner: &I) -> Lifetime<I>[src]

Wrap the placeholder instance in a lifetime.

pub fn to_ty<I: Interner>(self, interner: &I) -> Ty<I>[src]

Create an interned type.

pub fn to_const<I: Interner>(self, interner: &I, ty: Ty<I>) -> Const<I>[src]

Wrap the placeholder index in a constant.

Trait Implementations

impl Clone for PlaceholderIndex[src]

impl Copy for PlaceholderIndex[src]

impl Debug for PlaceholderIndex[src]

impl Eq for PlaceholderIndex[src]

impl<I: Interner, TI: TargetInterner<I>> Fold<I, TI> for PlaceholderIndex[src]

type Result = Self

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 Hash for PlaceholderIndex[src]

impl Ord for PlaceholderIndex[src]

impl PartialEq<PlaceholderIndex> for PlaceholderIndex[src]

impl PartialOrd<PlaceholderIndex> for PlaceholderIndex[src]

impl StructuralEq for PlaceholderIndex[src]

impl StructuralPartialEq for PlaceholderIndex[src]

impl<I: Interner> Visit<I> for PlaceholderIndex[src]

impl<I: Interner> Zip<I> for PlaceholderIndex[src]

Auto Trait Implementations

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]