Struct proc_macro::bridge::ExpnGlobals
source · pub struct ExpnGlobals<Span> {
pub def_site: Span,
pub call_site: Span,
pub mixed_site: Span,
}
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)Expand description
Globals provided alongside the initial inputs for a macro expansion. Provides values such as spans which are used frequently to avoid RPC.
Fields§
§def_site: Span
🔬This is a nightly-only experimental API. (
§proc_macro_internals
#27812)call_site: Span
🔬This is a nightly-only experimental API. (
§proc_macro_internals
#27812)mixed_site: Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)Trait Implementations§
source§impl<Span: Clone> Clone for ExpnGlobals<Span>
impl<Span: Clone> Clone for ExpnGlobals<Span>
source§fn clone(&self) -> ExpnGlobals<Span>
fn clone(&self) -> ExpnGlobals<Span>
Returns a copy 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 moresource§impl<'a, S, Span: for<'s> DecodeMut<'a, 's, S>> DecodeMut<'a, '_, S> for ExpnGlobals<Span>
impl<'a, S, Span: for<'s> DecodeMut<'a, 's, S>> DecodeMut<'a, '_, S> for ExpnGlobals<Span>
source§impl<S, Span: Encode<S>> Encode<S> for ExpnGlobals<Span>
impl<S, Span: Encode<S>> Encode<S> for ExpnGlobals<Span>
source§impl<Span: Mark> Mark for ExpnGlobals<Span>
impl<Span: Mark> Mark for ExpnGlobals<Span>
Auto Trait Implementations§
impl<Span> RefUnwindSafe for ExpnGlobals<Span>where Span: RefUnwindSafe,
impl<Span> Send for ExpnGlobals<Span>where Span: Send,
impl<Span> Sync for ExpnGlobals<Span>where Span: Sync,
impl<Span> Unpin for ExpnGlobals<Span>where Span: Unpin,
impl<Span> UnwindSafe for ExpnGlobals<Span>where Span: UnwindSafe,
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