pub struct ResolverMacroData {
pub defsite_module_file_id: ModuleFileId,
pub callsite_module_file_id: ModuleFileId,
pub expansion_mappings: Arc<[CodeMapping]>,
pub parent_macro_call_data: Option<Box<ResolverMacroData>>,
}
Expand description
Resolving data needed for resolving macro expanded code in the correct context.
Fields§
§defsite_module_file_id: ModuleFileId
The module file id of the macro definition site. It is used if the path begins with
$defsite
.
callsite_module_file_id: ModuleFileId
The module file id of the macro call site. Items are resolved in this context in two cases:
- The path begins with
$callsite
. - The path was supplied as a macro argument. In other words, the path is an expansion of a placeholder and is not a part of the macro expansion template.
expansion_mappings: Arc<[CodeMapping]>
This is the mappings of the macro expansion. It is used to determine if a part of the code came from a macro argument or from the macro expansion template.
parent_macro_call_data: Option<Box<ResolverMacroData>>
The parent macro data. Exists in case of a macro calling another macro, and is used if we climb to the callsite environment.
Trait Implementations§
Source§impl Clone for ResolverMacroData
impl Clone for ResolverMacroData
Source§fn clone(&self) -> ResolverMacroData
fn clone(&self) -> ResolverMacroData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ResolverMacroData
impl RefUnwindSafe for ResolverMacroData
impl Send for ResolverMacroData
impl Sync for ResolverMacroData
impl Unpin for ResolverMacroData
impl UnwindSafe for ResolverMacroData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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