[−][src]Struct rustc_hir::hir::TypeBinding

pub struct TypeBinding<'hir> {
    pub hir_id: HirId,
    pub ident: Ident,
    pub kind: TypeBindingKind<'hir>,
    pub span: Span,
}

Bind a type to an associated type (i.e., A = Foo).

Bindings like A: Debug are represented as a special type A = $::Debug that is understood by the astconv code.

FIXME(alexreg): why have a separate type for the binding case, wouldn't it be better to make the ty field an enum like the following?

enum TypeBindingKind {
   Equals(...),
   Binding(...),
}

Fields

hir_id: HirIdident: Identkind: TypeBindingKind<'hir>span: Span

Implementations

impl<'_> TypeBinding<'_>[src]

pub fn ty(&self) -> &Ty<'_>[src]

Trait Implementations

impl<'hir> Debug for TypeBinding<'hir>[src]

impl<'hir, __CTX> HashStable<__CTX> for TypeBinding<'hir> where
    __CTX: HashStableContext, 
[src]

Auto Trait Implementations

impl<'hir> !RefUnwindSafe for TypeBinding<'hir>

impl<'hir> !Send for TypeBinding<'hir>

impl<'hir> !Sync for TypeBinding<'hir>

impl<'hir> Unpin for TypeBinding<'hir>

impl<'hir> !UnwindSafe for TypeBinding<'hir>

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.