[][src]Struct ra_ap_mbe::MacroRules

pub struct MacroRules { /* fields omitted */ }

This struct contains AST for a single macro_rules definition. What might be very confusing is that AST has almost exactly the same shape as tt::TokenTree, but there's a crucial difference: in macro rules, $ident and $()* have special meaning (see Var and Repeat data structures)

Implementations

impl MacroRules[src]

pub fn parse(tt: &Subtree) -> Result<MacroRules, ParseError>[src]

pub fn expand(&self, tt: &Subtree) -> ExpandResult<Subtree>[src]

pub fn map_id_down(&self, id: TokenId) -> TokenId[src]

pub fn map_id_up(&self, id: TokenId) -> (TokenId, Origin)[src]

Trait Implementations

impl Clone for MacroRules[src]

impl Debug for MacroRules[src]

impl Eq for MacroRules[src]

impl PartialEq<MacroRules> for MacroRules[src]

impl StructuralEq for MacroRules[src]

impl StructuralPartialEq for MacroRules[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.