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

source§

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

source§

type ID = SyntaxContextId

source§

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

Implementors§

source§

impl Intern for MacroCallLoc

source§

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

source§

type ID = MacroCallId

source§

impl Intern for AssocItemLoc<Const>

source§

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

source§

type ID = ConstId

source§

impl Intern for AssocItemLoc<Function>

source§

impl Intern for AssocItemLoc<TypeAlias>

source§

impl Intern for BlockLoc

source§

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

source§

type ID = BlockId

source§

impl Intern for ConstBlockLoc

source§

impl Intern for EnumVariantLoc

source§

impl Intern for InTypeConstLoc

source§

impl Intern for ItemLoc<ExternBlock>

source§

impl Intern for ItemLoc<ExternCrate>

source§

impl Intern for ItemLoc<Impl>

source§

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

source§

type ID = ImplId

source§

impl Intern for ItemLoc<Struct>

source§

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

source§

type ID = StructId

source§

impl Intern for ItemLoc<Use>

source§

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

source§

type ID = UseId

source§

impl Intern for Macro2Loc

source§

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

source§

type ID = Macro2Id

source§

impl Intern for MacroRulesLoc

source§

impl Intern for ProcMacroLoc

source§

impl Intern for EnumLoc

source§

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

source§

type ID = EnumId

source§

impl Intern for StaticLoc

source§

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

source§

type ID = StaticId

source§

impl Intern for TraitAliasLoc

source§

impl Intern for TraitLoc

source§

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

source§

type ID = TraitId

source§

impl Intern for UnionLoc

source§

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

source§

type ID = UnionId