Skip to main content

ModuleId

Type Alias ModuleId 

Source
pub type ModuleId = ModuleIdLt<'static>;

Aliased Type§

pub struct ModuleId(pub(crate) Id, pub(crate) PhantomData<fn() -> &'static ()>);

Tuple Fields§

§0: Id§1: PhantomData<fn() -> &'static ()>

Implementations§

Source§

impl ModuleId

Source

pub unsafe fn to_db<'db>(self, _db: &'db dyn SourceDatabase) -> ModuleIdLt<'db>

§Safety

The caller must ensure that the ModuleId comes from the given database.

Trait Implementations§

Source§

impl HasModule for ModuleId

Source§

fn module(&self, _db: &dyn SourceDatabase) -> ModuleId

Returns the enclosing module this thing is defined within.
Source§

fn krate(&self, db: &dyn SourceDatabase) -> Crate

Returns the crate this thing is defined within.
Source§

impl HasResolver for ModuleId

Source§

fn resolver(self, db: &dyn SourceDatabase) -> Resolver<'_>

Builds a resolver for type references inside this def.