Struct ra_ap_hir_def::ModuleId
source · pub struct ModuleId {
pub local_id: LocalModuleId,
/* private fields */
}
Fields§
§local_id: LocalModuleId
The module’s ID in its originating DefMap
.
Implementations§
source§impl ModuleId
impl ModuleId
pub fn def_map(&self, db: &dyn DefDatabase) -> Arc<DefMap>
pub fn krate(&self) -> CrateId
pub fn containing_module(&self, db: &dyn DefDatabase) -> Option<ModuleId>
pub fn containing_block(&self) -> Option<BlockId>
Trait Implementations§
source§impl ChildBySource for ModuleId
impl ChildBySource for ModuleId
fn child_by_source_to(
&self,
db: &dyn DefDatabase,
res: &mut DynMap,
file_id: HirFileId
)
fn child_by_source(&self, db: &dyn DefDatabase, file_id: HirFileId) -> DynMap
source§impl From<ModuleId> for ItemContainerId
impl From<ModuleId> for ItemContainerId
source§fn from(it: ModuleId) -> ItemContainerId
fn from(it: ModuleId) -> ItemContainerId
Converts to this type from the input type.
source§impl From<ModuleId> for ModuleDefId
impl From<ModuleId> for ModuleDefId
source§fn from(it: ModuleId) -> ModuleDefId
fn from(it: ModuleId) -> ModuleDefId
Converts to this type from the input type.
source§impl HasResolver for ModuleId
impl HasResolver for ModuleId
source§fn resolver(self, db: &dyn DefDatabase) -> Resolver
fn resolver(self, db: &dyn DefDatabase) -> Resolver
Builds a resolver for type references inside this def.
source§impl PartialEq<ModuleId> for ModuleId
impl PartialEq<ModuleId> for ModuleId
impl Copy for ModuleId
impl Eq for ModuleId
impl StructuralEq for ModuleId
impl StructuralPartialEq for ModuleId
Auto Trait Implementations§
impl RefUnwindSafe for ModuleId
impl Send for ModuleId
impl Sync for ModuleId
impl Unpin for ModuleId
impl UnwindSafe for ModuleId
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.