Trait syntax::fold::Folder
[−]
[src]
pub trait Folder: Sized { fn fold_crate(&mut self, c: Crate) -> Crate { ... } fn fold_meta_items(&mut self, meta_items: Vec<P<MetaItem>>) -> Vec<P<MetaItem>> { ... } fn fold_meta_item(&mut self, meta_item: P<MetaItem>) -> P<MetaItem> { ... } fn fold_view_path(&mut self, view_path: P<ViewPath>) -> P<ViewPath> { ... } fn fold_foreign_item(&mut self, ni: ForeignItem) -> ForeignItem { ... } fn fold_item(&mut self, i: P<Item>) -> SmallVector<P<Item>> { ... } fn fold_item_simple(&mut self, i: Item) -> Item { ... } fn fold_struct_field(&mut self, sf: StructField) -> StructField { ... } fn fold_item_kind(&mut self, i: ItemKind) -> ItemKind { ... } fn fold_trait_item(&mut self, i: TraitItem) -> SmallVector<TraitItem> { ... } fn fold_impl_item(&mut self, i: ImplItem) -> SmallVector<ImplItem> { ... } fn fold_fn_decl(&mut self, d: P<FnDecl>) -> P<FnDecl> { ... } fn fold_block(&mut self, b: P<Block>) -> P<Block> { ... } fn fold_stmt(&mut self, s: Stmt) -> SmallVector<Stmt> { ... } fn fold_arm(&mut self, a: Arm) -> Arm { ... } fn fold_pat(&mut self, p: P<Pat>) -> P<Pat> { ... } fn fold_decl(&mut self, d: P<Decl>) -> SmallVector<P<Decl>> { ... } fn fold_expr(&mut self, e: P<Expr>) -> P<Expr> { ... } fn fold_opt_expr(&mut self, e: P<Expr>) -> Option<P<Expr>> { ... } fn fold_exprs(&mut self, es: Vec<P<Expr>>) -> Vec<P<Expr>> { ... } fn fold_ty(&mut self, t: P<Ty>) -> P<Ty> { ... } fn fold_ty_binding(&mut self, t: TypeBinding) -> TypeBinding { ... } fn fold_mod(&mut self, m: Mod) -> Mod { ... } fn fold_foreign_mod(&mut self, nm: ForeignMod) -> ForeignMod { ... } fn fold_variant(&mut self, v: Variant) -> Variant { ... } fn fold_ident(&mut self, i: Ident) -> Ident { ... } fn fold_usize(&mut self, i: usize) -> usize { ... } fn fold_path(&mut self, p: Path) -> Path { ... } fn fold_path_parameters(&mut self, p: PathParameters) -> PathParameters { ... } fn fold_angle_bracketed_parameter_data(&mut self, p: AngleBracketedParameterData) -> AngleBracketedParameterData { ... } fn fold_parenthesized_parameter_data(&mut self, p: ParenthesizedParameterData) -> ParenthesizedParameterData { ... } fn fold_local(&mut self, l: P<Local>) -> P<Local> { ... } fn fold_mac(&mut self, _mac: Mac) -> Mac { ... } fn fold_explicit_self(&mut self, es: ExplicitSelf) -> ExplicitSelf { ... } fn fold_explicit_self_kind(&mut self, es: SelfKind) -> SelfKind { ... } fn fold_lifetime(&mut self, l: Lifetime) -> Lifetime { ... } fn fold_lifetime_def(&mut self, l: LifetimeDef) -> LifetimeDef { ... } fn fold_attribute(&mut self, at: Attribute) -> Option<Attribute> { ... } fn fold_arg(&mut self, a: Arg) -> Arg { ... } fn fold_generics(&mut self, generics: Generics) -> Generics { ... } fn fold_trait_ref(&mut self, p: TraitRef) -> TraitRef { ... } fn fold_poly_trait_ref(&mut self, p: PolyTraitRef) -> PolyTraitRef { ... } fn fold_variant_data(&mut self, vdata: VariantData) -> VariantData { ... } fn fold_lifetimes(&mut self, lts: Vec<Lifetime>) -> Vec<Lifetime> { ... } fn fold_lifetime_defs(&mut self, lts: Vec<LifetimeDef>) -> Vec<LifetimeDef> { ... } fn fold_ty_param(&mut self, tp: TyParam) -> TyParam { ... } fn fold_ty_params(&mut self, tps: P<[TyParam]>) -> P<[TyParam]> { ... } fn fold_tt(&mut self, tt: &TokenTree) -> TokenTree { ... } fn fold_tts(&mut self, tts: &[TokenTree]) -> Vec<TokenTree> { ... } fn fold_token(&mut self, t: Token) -> Token { ... } fn fold_interpolated(&mut self, nt: Nonterminal) -> Nonterminal { ... } fn fold_opt_lifetime(&mut self, o_lt: Option<Lifetime>) -> Option<Lifetime> { ... } fn fold_opt_bounds(&mut self, b: Option<TyParamBounds>) -> Option<TyParamBounds> { ... } fn fold_bounds(&mut self, b: TyParamBounds) -> TyParamBounds { ... } fn fold_ty_param_bound(&mut self, tpb: TyParamBound) -> TyParamBound { ... } fn fold_mt(&mut self, mt: MutTy) -> MutTy { ... } fn fold_field(&mut self, field: Field) -> Field { ... } fn fold_where_clause(&mut self, where_clause: WhereClause) -> WhereClause { ... } fn fold_where_predicate(&mut self, where_predicate: WherePredicate) -> WherePredicate { ... } fn fold_vis(&mut self, vis: Visibility) -> Visibility { ... } fn new_id(&mut self, i: NodeId) -> NodeId { ... } fn new_span(&mut self, sp: Span) -> Span { ... } }
Unstable (
rustc_private
)Provided Methods
fn fold_crate(&mut self, c: Crate) -> Crate
Unstable (
rustc_private
)fn fold_meta_items(&mut self, meta_items: Vec<P<MetaItem>>) -> Vec<P<MetaItem>>
Unstable (
rustc_private
)fn fold_meta_item(&mut self, meta_item: P<MetaItem>) -> P<MetaItem>
Unstable (
rustc_private
)fn fold_view_path(&mut self, view_path: P<ViewPath>) -> P<ViewPath>
Unstable (
rustc_private
)fn fold_foreign_item(&mut self, ni: ForeignItem) -> ForeignItem
Unstable (
rustc_private
)fn fold_item(&mut self, i: P<Item>) -> SmallVector<P<Item>>
Unstable (
rustc_private
)fn fold_item_simple(&mut self, i: Item) -> Item
Unstable (
rustc_private
)fn fold_struct_field(&mut self, sf: StructField) -> StructField
Unstable (
rustc_private
)fn fold_item_kind(&mut self, i: ItemKind) -> ItemKind
Unstable (
rustc_private
)fn fold_trait_item(&mut self, i: TraitItem) -> SmallVector<TraitItem>
Unstable (
rustc_private
)fn fold_impl_item(&mut self, i: ImplItem) -> SmallVector<ImplItem>
Unstable (
rustc_private
)fn fold_fn_decl(&mut self, d: P<FnDecl>) -> P<FnDecl>
Unstable (
rustc_private
)fn fold_block(&mut self, b: P<Block>) -> P<Block>
Unstable (
rustc_private
)fn fold_stmt(&mut self, s: Stmt) -> SmallVector<Stmt>
Unstable (
rustc_private
)fn fold_arm(&mut self, a: Arm) -> Arm
Unstable (
rustc_private
)fn fold_pat(&mut self, p: P<Pat>) -> P<Pat>
Unstable (
rustc_private
)fn fold_decl(&mut self, d: P<Decl>) -> SmallVector<P<Decl>>
Unstable (
rustc_private
)fn fold_expr(&mut self, e: P<Expr>) -> P<Expr>
Unstable (
rustc_private
)fn fold_opt_expr(&mut self, e: P<Expr>) -> Option<P<Expr>>
Unstable (
rustc_private
)fn fold_exprs(&mut self, es: Vec<P<Expr>>) -> Vec<P<Expr>>
Unstable (
rustc_private
)fn fold_ty(&mut self, t: P<Ty>) -> P<Ty>
Unstable (
rustc_private
)fn fold_ty_binding(&mut self, t: TypeBinding) -> TypeBinding
Unstable (
rustc_private
)fn fold_mod(&mut self, m: Mod) -> Mod
Unstable (
rustc_private
)fn fold_foreign_mod(&mut self, nm: ForeignMod) -> ForeignMod
Unstable (
rustc_private
)fn fold_variant(&mut self, v: Variant) -> Variant
Unstable (
rustc_private
)fn fold_ident(&mut self, i: Ident) -> Ident
Unstable (
rustc_private
)fn fold_usize(&mut self, i: usize) -> usize
Unstable (
rustc_private
)fn fold_path(&mut self, p: Path) -> Path
Unstable (
rustc_private
)fn fold_path_parameters(&mut self, p: PathParameters) -> PathParameters
Unstable (
rustc_private
)fn fold_angle_bracketed_parameter_data(&mut self, p: AngleBracketedParameterData) -> AngleBracketedParameterData
Unstable (
rustc_private
)fn fold_parenthesized_parameter_data(&mut self, p: ParenthesizedParameterData) -> ParenthesizedParameterData
Unstable (
rustc_private
)fn fold_local(&mut self, l: P<Local>) -> P<Local>
Unstable (
rustc_private
)fn fold_mac(&mut self, _mac: Mac) -> Mac
Unstable (
rustc_private
)fn fold_explicit_self(&mut self, es: ExplicitSelf) -> ExplicitSelf
Unstable (
rustc_private
)fn fold_explicit_self_kind(&mut self, es: SelfKind) -> SelfKind
Unstable (
rustc_private
)fn fold_lifetime(&mut self, l: Lifetime) -> Lifetime
Unstable (
rustc_private
)fn fold_lifetime_def(&mut self, l: LifetimeDef) -> LifetimeDef
Unstable (
rustc_private
)fn fold_attribute(&mut self, at: Attribute) -> Option<Attribute>
Unstable (
rustc_private
)fn fold_arg(&mut self, a: Arg) -> Arg
Unstable (
rustc_private
)fn fold_generics(&mut self, generics: Generics) -> Generics
Unstable (
rustc_private
)fn fold_trait_ref(&mut self, p: TraitRef) -> TraitRef
Unstable (
rustc_private
)fn fold_poly_trait_ref(&mut self, p: PolyTraitRef) -> PolyTraitRef
Unstable (
rustc_private
)fn fold_variant_data(&mut self, vdata: VariantData) -> VariantData
Unstable (
rustc_private
)fn fold_lifetimes(&mut self, lts: Vec<Lifetime>) -> Vec<Lifetime>
Unstable (
rustc_private
)fn fold_lifetime_defs(&mut self, lts: Vec<LifetimeDef>) -> Vec<LifetimeDef>
Unstable (
rustc_private
)fn fold_ty_param(&mut self, tp: TyParam) -> TyParam
Unstable (
rustc_private
)fn fold_ty_params(&mut self, tps: P<[TyParam]>) -> P<[TyParam]>
Unstable (
rustc_private
)fn fold_tt(&mut self, tt: &TokenTree) -> TokenTree
Unstable (
rustc_private
)fn fold_tts(&mut self, tts: &[TokenTree]) -> Vec<TokenTree>
Unstable (
rustc_private
)fn fold_token(&mut self, t: Token) -> Token
Unstable (
rustc_private
)fn fold_interpolated(&mut self, nt: Nonterminal) -> Nonterminal
Unstable (
rustc_private
)fn fold_opt_lifetime(&mut self, o_lt: Option<Lifetime>) -> Option<Lifetime>
Unstable (
rustc_private
)fn fold_opt_bounds(&mut self, b: Option<TyParamBounds>) -> Option<TyParamBounds>
Unstable (
rustc_private
)fn fold_bounds(&mut self, b: TyParamBounds) -> TyParamBounds
Unstable (
rustc_private
)fn fold_ty_param_bound(&mut self, tpb: TyParamBound) -> TyParamBound
Unstable (
rustc_private
)fn fold_mt(&mut self, mt: MutTy) -> MutTy
Unstable (
rustc_private
)fn fold_field(&mut self, field: Field) -> Field
Unstable (
rustc_private
)fn fold_where_clause(&mut self, where_clause: WhereClause) -> WhereClause
Unstable (
rustc_private
)fn fold_where_predicate(&mut self, where_predicate: WherePredicate) -> WherePredicate
Unstable (
rustc_private
)fn fold_vis(&mut self, vis: Visibility) -> Visibility
Unstable (
rustc_private
)fn new_id(&mut self, i: NodeId) -> NodeId
Unstable (
rustc_private
)fn new_span(&mut self, sp: Span) -> Span
Unstable (
rustc_private
)Implementors
impl<'a> Folder for IdentRenamer<'a>
impl<'a> Folder for PatIdentRenamer<'a>
impl<'a, 'b> Folder for MacroExpander<'a, 'b>