Struct syntex_syntax::ast::MacroDef [] [src]

pub struct MacroDef {
    pub ident: Ident,
    pub attrs: Vec<Attribute>,
    pub id: NodeId,
    pub span: Span,
    pub imported_from: Option<Ident>,
    pub export: bool,
    pub use_locally: bool,
    pub allow_internal_unstable: bool,
    pub body: Vec<TokenTree>,
}

A macro definition, in this crate or imported from another.

Not parsed directly, but created on macro import or macro_rules! expansion.

Fields

ident: Ident attrs: Vec<Attribute> id: NodeId span: Span imported_from: Option<Ident> export: bool use_locally: bool allow_internal_unstable: bool body: Vec<TokenTree>

Trait Implementations

impl Debug for MacroDef
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Hash for MacroDef
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Decodable for MacroDef
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<MacroDef, __D::Error>

impl Encodable for MacroDef
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for MacroDef
[src]

impl PartialEq for MacroDef
[src]

fn eq(&self, __arg_0: &MacroDef) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &MacroDef) -> bool

This method tests for !=.

impl Clone for MacroDef
[src]

fn clone(&self) -> MacroDef

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more