[−][src]Enum syntax::ext::expand::AstFragment
A fragment of AST that can be produced by a single macro expansion. Can also serve as an input and intermediate result for macro expansion operations.
Variants
OptExpr(Option<P<Expr>>)
Expr(P<Expr>)
Pat(P<Pat>)
Ty(P<Ty>)
Stmts(SmallVec<[Stmt; 1]>)
Items(SmallVec<[P<Item>; 1]>)
TraitItems(SmallVec<[TraitItem; 1]>)
ImplItems(SmallVec<[ImplItem; 1]>)
ForeignItems(SmallVec<[ForeignItem; 1]>)
Methods
impl AstFragment
[src]
pub fn make_opt_expr(self) -> Option<P<Expr>>
[src]
pub fn make_expr(self) -> P<Expr>
[src]
pub fn make_pat(self) -> P<Pat>
[src]
pub fn make_ty(self) -> P<Ty>
[src]
pub fn make_stmts(self) -> SmallVec<[Stmt; 1]>
[src]
pub fn make_items(self) -> SmallVec<[P<Item>; 1]>
[src]
pub fn make_trait_items(self) -> SmallVec<[TraitItem; 1]>
[src]
pub fn make_impl_items(self) -> SmallVec<[ImplItem; 1]>
[src]
pub fn make_foreign_items(self) -> SmallVec<[ForeignItem; 1]>
[src]
pub fn mut_visit_with<F: MutVisitor>(&mut self, vis: &mut F)
[src]
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V)
[src]
Auto Trait Implementations
impl !Send for AstFragment
impl !Sync for AstFragment
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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<E> SpecializationError for E
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,