pub trait HasModule {
// Required method
fn module(&self, db: &dyn DefDatabase) -> ModuleId;
// Provided method
fn krate(&self, db: &dyn DefDatabase) -> CrateId { ... }
}
Required Methods§
sourcefn module(&self, db: &dyn DefDatabase) -> ModuleId
fn module(&self, db: &dyn DefDatabase) -> ModuleId
Returns the enclosing module this thing is defined within.
Provided Methods§
sourcefn krate(&self, db: &dyn DefDatabase) -> CrateId
fn krate(&self, db: &dyn DefDatabase) -> CrateId
Returns the crate this thing is defined within.