pub enum ItemInNs {
Types(ModuleDef),
Values(ModuleDef),
Macros(Macro),
}Variants§
Implementations§
source§impl ItemInNs
impl ItemInNs
pub fn as_module_def(self) -> Option<ModuleDef>
sourcepub fn krate(&self, db: &dyn HirDatabase) -> Option<Crate>
pub fn krate(&self, db: &dyn HirDatabase) -> Option<Crate>
Returns the crate defining this item (or None if self is built-in).
pub fn attrs(&self, db: &dyn HirDatabase) -> Option<AttrsWithOwner>
Trait Implementations§
source§impl PartialEq for ItemInNs
impl PartialEq for ItemInNs
impl Copy for ItemInNs
impl Eq for ItemInNs
impl StructuralEq for ItemInNs
impl StructuralPartialEq for ItemInNs
Auto Trait Implementations§
impl RefUnwindSafe for ItemInNs
impl Send for ItemInNs
impl Sync for ItemInNs
impl Unpin for ItemInNs
impl UnwindSafe for ItemInNs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Cast for T
impl<T> Cast for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.