hir_def

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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