[−][src]Struct rustc_expand::base::MacEager

pub struct MacEager {
    pub expr: Option<P<Expr>>,
    pub pat: Option<P<Pat>>,
    pub items: Option<SmallVec<[P<Item>; 1]>>,
    pub impl_items: Option<SmallVec<[P<AssocItem>; 1]>>,
    pub trait_items: Option<SmallVec<[P<AssocItem>; 1]>>,
    pub foreign_items: Option<SmallVec<[P<ForeignItem>; 1]>>,
    pub stmts: Option<SmallVec<[Stmt; 1]>>,
    pub ty: Option<P<Ty>>,
}

MacResult implementation for the common case where you've already built each form of AST that you might return.

Fields

expr: Option<P<Expr>>pat: Option<P<Pat>>items: Option<SmallVec<[P<Item>; 1]>>impl_items: Option<SmallVec<[P<AssocItem>; 1]>>trait_items: Option<SmallVec<[P<AssocItem>; 1]>>foreign_items: Option<SmallVec<[P<ForeignItem>; 1]>>stmts: Option<SmallVec<[Stmt; 1]>>ty: Option<P<Ty>>

Implementations

impl MacEager[src]

pub fn expr(v: P<Expr>) -> Box<dyn MacResult>[src]

pub fn pat(v: P<Pat>) -> Box<dyn MacResult>[src]

pub fn items(v: SmallVec<[P<Item>; 1]>) -> Box<dyn MacResult>[src]

pub fn impl_items(v: SmallVec<[P<AssocItem>; 1]>) -> Box<dyn MacResult>[src]

pub fn trait_items(v: SmallVec<[P<AssocItem>; 1]>) -> Box<dyn MacResult>[src]

pub fn foreign_items(v: SmallVec<[P<ForeignItem>; 1]>) -> Box<dyn MacResult>[src]

pub fn stmts(v: SmallVec<[Stmt; 1]>) -> Box<dyn MacResult>[src]

pub fn ty(v: P<Ty>) -> Box<dyn MacResult>[src]

Trait Implementations

impl Default for MacEager[src]

impl MacResult for MacEager[src]

Auto Trait Implementations

impl !RefUnwindSafe for MacEager

impl !Send for MacEager

impl !Sync for MacEager

impl Unpin for MacEager

impl !UnwindSafe for MacEager

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<T> From<T> for T[src]

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

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.