[][src]Struct chalk_rust_ir::AssociatedTyValue

pub struct AssociatedTyValue<I: Interner> {
    pub impl_id: ImplId<I>,
    pub associated_ty_id: AssocTypeId<I>,
    pub value: Binders<AssociatedTyValueBound<I>>,
}

Represents the value of an associated type that is assigned from within some impl.

This example is not tested
impl Iterator for Foo {
    type Item = XXX; // <-- represents this line!
}

Fields

impl_id: ImplId<I>

Impl in which this associated type value is found. You might need to look at this to find the generic parameters defined on the impl, for example.

This example is not tested
impl Iterator for Foo { // <-- refers to this impl
    type Item = XXX; // <-- (where this is self)
}
associated_ty_id: AssocTypeId<I>

Associated type being defined.

This example is not tested
impl Iterator for Foo {
    type Item = XXX; // <-- (where this is self)
}
...
trait Iterator {
    type Item; // <-- refers to this declaration here!
}
value: Binders<AssociatedTyValueBound<I>>

Additional binders declared on the associated type itself, beyond those from the impl. This would be empty for normal associated types, but non-empty for generic associated types.

This example is not tested
impl<T> Iterable for Vec<T> {
    type Iter<'a> = vec::Iter<'a, T>;
          // ^^^^ refers to these generics here
}

Trait Implementations

impl<I: Clone + Interner> Clone for AssociatedTyValue<I>[src]

impl<I: Debug + Interner> Debug for AssociatedTyValue<I>[src]

impl<I: Eq + Interner> Eq for AssociatedTyValue<I>[src]

impl<I: Interner, _TI> Fold<I, _TI> for AssociatedTyValue<I> where
    _TI: TargetInterner<I>, 
[src]

type Result = AssociatedTyValue<_TI>

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<I: Hash + Interner> Hash for AssociatedTyValue<I>[src]

impl<I: PartialEq + Interner> PartialEq<AssociatedTyValue<I>> for AssociatedTyValue<I>[src]

impl<I: Interner> StructuralEq for AssociatedTyValue<I>[src]

impl<I: Interner> StructuralPartialEq for AssociatedTyValue<I>[src]

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

Auto Trait Implementations

impl<I> RefUnwindSafe for AssociatedTyValue<I> where
    <I as Interner>::DefId: RefUnwindSafe,
    <I as Interner>::InternedParameterKinds: RefUnwindSafe,
    <I as Interner>::InternedType: RefUnwindSafe

impl<I> Send for AssociatedTyValue<I> where
    <I as Interner>::DefId: Send,
    <I as Interner>::InternedParameterKinds: Send,
    <I as Interner>::InternedType: Send

impl<I> Sync for AssociatedTyValue<I> where
    <I as Interner>::DefId: Sync,
    <I as Interner>::InternedParameterKinds: Sync,
    <I as Interner>::InternedType: Sync

impl<I> Unpin for AssociatedTyValue<I> where
    <I as Interner>::DefId: Unpin,
    <I as Interner>::InternedParameterKinds: Unpin,
    <I as Interner>::InternedType: Unpin

impl<I> UnwindSafe for AssociatedTyValue<I> where
    <I as Interner>::DefId: UnwindSafe,
    <I as Interner>::InternedParameterKinds: UnwindSafe,
    <I as Interner>::InternedType: UnwindSafe

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]