Trait cl_typeck::type_resolver::TypeResolvable

source ·
pub trait TypeResolvable<'a> {
    type Out;

    // Required method
    fn resolve_type(
        self,
        prj: &mut Prj<'a>,
        id: DefID
    ) -> Result<Self::Out, &'static str>;
}
Expand description

Resolves a given node

Required Associated Types§

source

type Out

The return type upon success

Required Methods§

source

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

Resolves type expressions within this node

Implementations on Foreign Types§

source§

impl<'a> TypeResolvable<'a> for &'a TyKind

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Alias

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Const

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Enum

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Function

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Impl

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Let

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Meta

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Module

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Static

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Struct

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a StructMember

§

type Out = (Interned<'static, str>, Visibility, DefID)

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Use

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a> TypeResolvable<'a> for &'a Variant

§

type Out = DefKind

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a, T> TypeResolvable<'a> for &'a [T]
where &'a T: TypeResolvable<'a>,

§

type Out = Vec<<&'a T as TypeResolvable<'a>>::Out>

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

source§

impl<'a, T> TypeResolvable<'a> for Option<&'a T>
where &'a T: TypeResolvable<'a>,

§

type Out = Option<<&'a T as TypeResolvable<'a>>::Out>

source§

fn resolve_type( self, prj: &mut Prj<'a>, id: DefID ) -> Result<Self::Out, &'static str>

Implementors§

source§

impl<'a> TypeResolvable<'a> for NodeSource<'a>

§

type Out = DefKind