Trait hir_def::Intern

source ·
pub trait Intern {
    type Database<'db>: ?Sized;
    type ID;

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

Required Associated Types§

source

type Database<'db>: ?Sized

source

type ID

Required Methods§

source

fn intern(self, db: &Self::Database<'_>) -> Self::ID

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Intern for SyntaxContextData

§

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

§

type ID = SyntaxContextId

source§

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

Implementors§

source§

impl Intern for MacroCallLoc

§

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

§

type ID = MacroCallId

source§

impl Intern for AssocItemLoc<Const>

§

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

§

type ID = ConstId

source§

impl Intern for AssocItemLoc<Function>

§

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

§

type ID = FunctionId

source§

impl Intern for AssocItemLoc<TypeAlias>

§

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

§

type ID = TypeAliasId

source§

impl Intern for BlockLoc

§

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

§

type ID = BlockId

source§

impl Intern for ConstBlockLoc

§

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

§

type ID = ConstBlockId

source§

impl Intern for EnumVariantLoc

§

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

§

type ID = EnumVariantId

source§

impl Intern for InTypeConstLoc

§

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

§

type ID = InTypeConstId

source§

impl Intern for ItemLoc<ExternBlock>

§

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

§

type ID = ExternBlockId

source§

impl Intern for ItemLoc<ExternCrate>

§

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

§

type ID = ExternCrateId

source§

impl Intern for ItemLoc<Impl>

§

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

§

type ID = ImplId

source§

impl Intern for ItemLoc<Struct>

§

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

§

type ID = StructId

source§

impl Intern for ItemLoc<Use>

§

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

§

type ID = UseId

source§

impl Intern for Macro2Loc

§

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

§

type ID = Macro2Id

source§

impl Intern for MacroRulesLoc

§

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

§

type ID = MacroRulesId

source§

impl Intern for ProcMacroLoc

§

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

§

type ID = ProcMacroId

source§

impl Intern for EnumLoc

§

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

§

type ID = EnumId

source§

impl Intern for StaticLoc

§

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

§

type ID = StaticId

source§

impl Intern for TraitAliasLoc

§

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

§

type ID = TraitAliasId

source§

impl Intern for TraitLoc

§

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

§

type ID = TraitId

source§

impl Intern for UnionLoc

§

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

§

type ID = UnionId