Trait hir_def::Lookup

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

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

Required Associated Types§

Required Methods§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Lookup for MacroCallId

source§

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

source§

type Data = MacroCallLoc

source§

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

source§

impl Lookup for SyntaxContextId

source§

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

source§

type Data = SyntaxContextData

source§

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>