hir_def

Trait Intern

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

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

Required Associated Types§

type Database<'db>: ?Sized

type ID

Required Methods§

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Intern for SyntaxContextData

§

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

§

type ID = SyntaxContextId

§

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

Implementors§

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

§

impl Intern for MacroCallLoc

§

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

§

type ID = MacroCallId