[−][src]Struct syntax::ext::base::SyntaxExtension
A struct representing a macro definition in "lowered" form ready for expansion.
Fields
kind: SyntaxExtensionKind
A syntax extension kind.
def_info: Option<(NodeId, Span)>
Some info about the macro's definition point.
default_transparency: Transparency
Hygienic properties of spans produced by this macro by default.
allow_internal_unstable: Option<Lrc<[Symbol]>>
Whitelist of unstable features that are treated as stable inside this macro.
allow_internal_unsafe: bool
Suppresses the unsafe_code
lint for code produced by this macro.
local_inner_macros: bool
Enables the macro helper hack (ident!(...)
-> $crate::ident!(...)
) for this macro.
unstable_feature: Option<(Symbol, u32)>
The macro's feature name and tracking issue number if it is unstable.
helper_attrs: Vec<Symbol>
Names of helper attributes registered by this macro.
edition: Edition
Edition of the crate in which this macro is defined.
Methods
impl SyntaxExtension
[src]
pub fn macro_kind(&self) -> MacroKind
[src]
Returns which kind of macro calls this syntax extension.
pub fn default(kind: SyntaxExtensionKind, edition: Edition) -> SyntaxExtension
[src]
Constructs a syntax extension with default properties.
pub fn expn_info(&self, call_site: Span, format: &str) -> ExpnInfo
[src]
Auto Trait Implementations
impl !Send for SyntaxExtension
impl Unpin for SyntaxExtension
impl !Sync for SyntaxExtension
impl !UnwindSafe for SyntaxExtension
impl !RefUnwindSafe for SyntaxExtension
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,