pub struct ModuleDeclarationSite {
pub name: Box<str>,
pub declared_paths: Box<[Box<str>]>,
pub definition: usize,
pub inline_scope: Option<usize>,
pub scope: usize,
/* private fields */
}Expand description
A mod item, whether it holds an inline body or names another source.
The module closure reads this table rather than walking the syntax tree a
second time, so #[path], inline bodies, and conditional compilation have
one owner.
Fields§
§name: Box<str>The declared module name.
declared_paths: Box<[Box<str>]>Every #[path = "…"] override the item carries, in attribute order.
Usually empty or one entry. Several appear when mutually exclusive
cfg_attr predicates give one module a source per configuration, which
is how a crate selects between a platform’s or feature’s
implementations. Conditions are recorded, never evaluated, so every
alternative stays visible.
definition: usizeIndex into FileIr::definition_sites of the module this item defines.
inline_scope: Option<usize>The scope this item opens, for an inline module only.
scope: usizeThe scope this item is declared in.
Trait Implementations§
Auto Trait Implementations§
impl !Send for ModuleDeclarationSite
impl !Sync for ModuleDeclarationSite
impl Freeze for ModuleDeclarationSite
impl RefUnwindSafe for ModuleDeclarationSite
impl Unpin for ModuleDeclarationSite
impl UnsafeUnpin for ModuleDeclarationSite
impl UnwindSafe for ModuleDeclarationSite
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
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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