hir_def

Trait Lookup

pub trait Lookup {
    type Database<'db>: ?Sized;
    type Data;

    // Required method
    fn lookup(&self, db: &Self::Database<'_>) -> Self::Data;
}

Required Associated Types§

type Database<'db>: ?Sized

type Data

Required Methods§

fn lookup(&self, db: &Self::Database<'_>) -> Self::Data

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Lookup for MacroCallId

§

type Database<'db> = dyn ExpandDatabase + 'db

§

type Data = MacroCallLoc

§

fn lookup(&self, db: &<MacroCallId as Lookup>::Database<'_>) -> MacroCallLoc

§

impl Lookup for SyntaxContextId

§

type Database<'db> = dyn ExpandDatabase + 'db

§

type Data = SyntaxContextData

§

fn lookup( &self, db: &<SyntaxContextId as Lookup>::Database<'_>, ) -> SyntaxContextData

Implementors§

source§

impl Lookup for BlockId

source§

impl Lookup for ConstBlockId

source§

impl Lookup for ConstId

source§

impl Lookup for EnumId

source§

impl Lookup for EnumVariantId

source§

impl Lookup for ExternBlockId

source§

impl Lookup for ExternCrateId

source§

impl Lookup for FunctionId

source§

impl Lookup for ImplId

source§

impl Lookup for InTypeConstId

source§

impl Lookup for Macro2Id

source§

impl Lookup for MacroRulesId

source§

impl Lookup for ProcMacroId

source§

impl Lookup for StaticId

source§

impl Lookup for StructId

source§

impl Lookup for TraitAliasId

source§

impl Lookup for TraitId

source§

impl Lookup for TypeAliasId

source§

impl Lookup for UnionId

source§

impl Lookup for UseId

source§

type Database<'db> = dyn DefDatabase + 'db

source§

type Data = ItemLoc<Use>