pub struct ItemScope { /* private fields */ }
Implementations§
source§impl ItemScope
impl ItemScope
Legacy macros can only be accessed through special methods like get_legacy_macros
.
Other methods will only resolve values, types and module scoped macros only.
pub fn entries(&self) -> impl Iterator<Item = (&Name, PerNs)> + '_
pub fn imports(&self) -> impl Iterator<Item = ImportId> + '_
pub fn fully_resolve_import( &self, db: &dyn DefDatabase, import: ImportId, ) -> PerNs
pub fn declarations(&self) -> impl Iterator<Item = ModuleDefId> + '_
pub fn extern_crate_decls( &self, ) -> impl ExactSizeIterator<Item = ExternCrateId> + '_
pub fn use_decls(&self) -> impl ExactSizeIterator<Item = UseId> + '_
pub fn impls(&self) -> impl ExactSizeIterator<Item = ImplId> + '_
pub fn all_macro_calls(&self) -> impl Iterator<Item = MacroCallId> + '_
pub fn unnamed_consts(&self) -> impl Iterator<Item = ConstId> + '_
sourcepub fn legacy_macros(&self) -> impl Iterator<Item = (&Name, &[MacroId])> + '_
pub fn legacy_macros(&self) -> impl Iterator<Item = (&Name, &[MacroId])> + '_
Iterate over all legacy textual scoped macros visible at the end of the module
pub fn iter_macro_invoc( &self, ) -> impl Iterator<Item = (&AstId<MacroCall>, &MacroCallId)>
source§impl ItemScope
impl ItemScope
pub fn attr_macro_invocs( &self, ) -> impl Iterator<Item = (AstId<Item>, MacroCallId)> + '_
pub fn derive_macro_invocs( &self, ) -> impl Iterator<Item = (AstId<Adt>, impl Iterator<Item = (AttrId, MacroCallId, &[Option<MacroCallId>])>)> + '_
pub fn derive_macro_invoc( &self, ast_id: AstId<Adt>, attr_id: AttrId, ) -> Option<MacroCallId>
Trait Implementations§
impl Eq for ItemScope
impl StructuralPartialEq for ItemScope
Auto Trait Implementations§
impl Freeze for ItemScope
impl RefUnwindSafe for ItemScope
impl Send for ItemScope
impl Sync for ItemScope
impl Unpin for ItemScope
impl UnwindSafe for ItemScope
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<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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more