[][src]Struct ra_ap_hir_def::nameres::ModuleData

pub struct ModuleData {
    pub parent: Option<LocalModuleId>,
    pub children: FxHashMap<Name, LocalModuleId>,
    pub scope: ItemScope,
    pub origin: ModuleOrigin,
}

Fields

parent: Option<LocalModuleId>children: FxHashMap<Name, LocalModuleId>scope: ItemScopeorigin: ModuleOrigin

Where does this module come from?

Implementations

impl ModuleData[src]

pub fn definition_source(&self, db: &dyn DefDatabase) -> InFile<ModuleSource>[src]

Returns a node which defines this module. That is, a file or a mod foo {} with items.

pub fn declaration_source(&self, db: &dyn DefDatabase) -> Option<InFile<Module>>[src]

Returns a node which declares this module, either a mod foo; or a mod foo {}. None for the crate root or block.

Trait Implementations

impl Debug for ModuleData[src]

impl Default for ModuleData[src]

impl Eq for ModuleData[src]

impl PartialEq<ModuleData> for ModuleData[src]

impl StructuralEq for ModuleData[src]

impl StructuralPartialEq for ModuleData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.