Skip to main content

ErrorWrapper

Struct ErrorWrapper 

Source
pub struct ErrorWrapper<'a, V>(pub &'a mut V);
Expand description

A visitor wrapper that automatically collects errors in ErrorNodes. Coupled with the trait VisitorWithErrors, this provides an error method on a visitor that can be used to throw errors, which will be automatically inlined in the AST on the closest error-capable node.

Tuple Fields§

§0: &'a mut V

Trait Implementations§

Source§

impl<'a, V: AstVisitorMut + VisitorWithErrors> AstVisitorMut for ErrorWrapper<'a, V>

Source§

fn visit_inner<T>(&mut self, x: &mut T)

Visit the contents of x. This calls self.visit() on each field of T. This is available for any type whose contents are all #trait_name.
Source§

fn visit_item(&mut self, x: &mut Item)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_pat(&mut self, x: &mut Pat)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_expr(&mut self, x: &mut Expr)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_ty(&mut self, x: &mut Ty)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit<'a, T: AstVisitable>(&'a mut self, x: &mut T)

Visit a visitable type. This calls the appropriate method of this trait on x (visit_$ty if it exists, visit_inner if not).
Source§

fn visit_by_val<T: AstVisitable>(self, x: &mut T) -> Self

Convenience alias for method chaining.
Source§

fn enter_expr(&mut self, x: &mut Expr)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_expr(&mut self, x: &mut Expr)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn enter_pat(&mut self, x: &mut Pat)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_pat(&mut self, x: &mut Pat)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_expr_kind(&mut self, x: &mut ExprKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_expr_kind(&mut self, x: &mut ExprKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_expr_kind(&mut self, x: &mut ExprKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_pat_kind(&mut self, x: &mut PatKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_pat_kind(&mut self, x: &mut PatKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_pat_kind(&mut self, x: &mut PatKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn enter_ty(&mut self, x: &mut Ty)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ty(&mut self, x: &mut Ty)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_ty_kind(&mut self, x: &mut TyKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_ty_kind(&mut self, x: &mut TyKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ty_kind(&mut self, x: &mut TyKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_metadata(&mut self, x: &mut Metadata)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_metadata(&mut self, x: &mut Metadata)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_metadata(&mut self, x: &mut Metadata)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_literal(&mut self, x: &mut Literal)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_literal(&mut self, x: &mut Literal)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_literal(&mut self, x: &mut Literal)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_local_id(&mut self, x: &mut LocalId)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_local_id(&mut self, x: &mut LocalId)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_local_id(&mut self, x: &mut LocalId)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_lhs(&mut self, x: &mut Lhs)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_lhs(&mut self, x: &mut Lhs)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_lhs(&mut self, x: &mut Lhs)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_symbol(&mut self, x: &mut Symbol)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_symbol(&mut self, x: &mut Symbol)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_symbol(&mut self, x: &mut Symbol)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_loop_kind(&mut self, x: &mut LoopKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_loop_kind(&mut self, x: &mut LoopKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_loop_kind(&mut self, x: &mut LoopKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_safety_kind(&mut self, x: &mut SafetyKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_safety_kind(&mut self, x: &mut SafetyKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_safety_kind(&mut self, x: &mut SafetyKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_quote(&mut self, x: &mut Quote)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_quote(&mut self, x: &mut Quote)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_quote(&mut self, x: &mut Quote)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_spanned_ty(&mut self, x: &mut SpannedTy)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_spanned_ty(&mut self, x: &mut SpannedTy)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_spanned_ty(&mut self, x: &mut SpannedTy)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_binding_mode(&mut self, x: &mut BindingMode)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_binding_mode(&mut self, x: &mut BindingMode)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_binding_mode(&mut self, x: &mut BindingMode)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_primitive_ty(&mut self, x: &mut PrimitiveTy)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_primitive_ty(&mut self, x: &mut PrimitiveTy)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_primitive_ty(&mut self, x: &mut PrimitiveTy)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_region(&mut self, x: &mut Region)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_region(&mut self, x: &mut Region)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_region(&mut self, x: &mut Region)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_impl_expr(&mut self, x: &mut ImplExpr)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_impl_expr(&mut self, x: &mut ImplExpr)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_impl_expr(&mut self, x: &mut ImplExpr)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_int_kind(&mut self, x: &mut IntKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_int_kind(&mut self, x: &mut IntKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_int_kind(&mut self, x: &mut IntKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_float_kind(&mut self, x: &mut FloatKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_float_kind(&mut self, x: &mut FloatKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_float_kind(&mut self, x: &mut FloatKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_generic_value(&mut self, x: &mut GenericValue)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_generic_value(&mut self, x: &mut GenericValue)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_generic_value(&mut self, x: &mut GenericValue)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_arm(&mut self, x: &mut Arm)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_arm(&mut self, x: &mut Arm)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_arm(&mut self, x: &mut Arm)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_loop_state(&mut self, x: &mut LoopState)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_loop_state(&mut self, x: &mut LoopState)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_loop_state(&mut self, x: &mut LoopState)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_control_flow_kind(&mut self, x: &mut ControlFlowKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_control_flow_kind(&mut self, x: &mut ControlFlowKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_control_flow_kind(&mut self, x: &mut ControlFlowKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_dyn_trait_goal(&mut self, x: &mut DynTraitGoal)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_dyn_trait_goal(&mut self, x: &mut DynTraitGoal)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_dyn_trait_goal(&mut self, x: &mut DynTraitGoal)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_attribute(&mut self, x: &mut Attribute)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_attribute(&mut self, x: &mut Attribute)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_attribute(&mut self, x: &mut Attribute)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_quote_content(&mut self, x: &mut QuoteContent)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_quote_content(&mut self, x: &mut QuoteContent)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_quote_content(&mut self, x: &mut QuoteContent)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_borrow_kind(&mut self, x: &mut BorrowKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_borrow_kind(&mut self, x: &mut BorrowKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_borrow_kind(&mut self, x: &mut BorrowKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_trait_goal(&mut self, x: &mut TraitGoal)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_trait_goal(&mut self, x: &mut TraitGoal)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_trait_goal(&mut self, x: &mut TraitGoal)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_impl_expr_kind(&mut self, x: &mut ImplExprKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_impl_expr_kind(&mut self, x: &mut ImplExprKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_impl_expr_kind(&mut self, x: &mut ImplExprKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_int_size(&mut self, x: &mut IntSize)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_int_size(&mut self, x: &mut IntSize)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_int_size(&mut self, x: &mut IntSize)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_signedness(&mut self, x: &mut Signedness)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_signedness(&mut self, x: &mut Signedness)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_signedness(&mut self, x: &mut Signedness)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_guard(&mut self, x: &mut Guard)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_guard(&mut self, x: &mut Guard)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_guard(&mut self, x: &mut Guard)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_attribute_kind(&mut self, x: &mut AttributeKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_attribute_kind(&mut self, x: &mut AttributeKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_attribute_kind(&mut self, x: &mut AttributeKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_guard_kind(&mut self, x: &mut GuardKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_guard_kind(&mut self, x: &mut GuardKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_guard_kind(&mut self, x: &mut GuardKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_impl_item(&mut self, x: &mut ImplItem)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_impl_item(&mut self, x: &mut ImplItem)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_impl_item(&mut self, x: &mut ImplItem)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_impl_item_kind(&mut self, x: &mut ImplItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_impl_item_kind(&mut self, x: &mut ImplItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_impl_item_kind(&mut self, x: &mut ImplItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_trait_item(&mut self, x: &mut TraitItem)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_trait_item(&mut self, x: &mut TraitItem)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_trait_item(&mut self, x: &mut TraitItem)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_trait_item_kind(&mut self, x: &mut TraitItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_trait_item_kind(&mut self, x: &mut TraitItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_trait_item_kind(&mut self, x: &mut TraitItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_item_quote_origin(&mut self, x: &mut ItemQuoteOrigin)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_item_quote_origin(&mut self, x: &mut ItemQuoteOrigin)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_item_quote_origin(&mut self, x: &mut ItemQuoteOrigin)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_item_quote_origin_kind(&mut self, x: &mut ItemQuoteOriginKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_item_quote_origin_kind(&mut self, x: &mut ItemQuoteOriginKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_item_quote_origin_kind(&mut self, x: &mut ItemQuoteOriginKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_item_quote_origin_position(&mut self, x: &mut ItemQuoteOriginPosition)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_item_quote_origin_position(&mut self, x: &mut ItemQuoteOriginPosition)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_item_quote_origin_position(&mut self, x: &mut ItemQuoteOriginPosition)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_generic_param_kind(&mut self, x: &mut GenericParamKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_generic_param_kind(&mut self, x: &mut GenericParamKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_generic_param_kind(&mut self, x: &mut GenericParamKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_impl_ident(&mut self, x: &mut ImplIdent)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_impl_ident(&mut self, x: &mut ImplIdent)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_impl_ident(&mut self, x: &mut ImplIdent)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_projection_predicate(&mut self, x: &mut ProjectionPredicate)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_projection_predicate(&mut self, x: &mut ProjectionPredicate)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_projection_predicate(&mut self, x: &mut ProjectionPredicate)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_generic_param(&mut self, x: &mut GenericParam)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_generic_param(&mut self, x: &mut GenericParam)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_generic_param(&mut self, x: &mut GenericParam)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_generics(&mut self, x: &mut Generics)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_generics(&mut self, x: &mut Generics)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_generics(&mut self, x: &mut Generics)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_doc_comment_kind(&mut self, x: &mut DocCommentKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_doc_comment_kind(&mut self, x: &mut DocCommentKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_doc_comment_kind(&mut self, x: &mut DocCommentKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_param(&mut self, x: &mut Param)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_param(&mut self, x: &mut Param)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_param(&mut self, x: &mut Param)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_variant(&mut self, x: &mut Variant)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_variant(&mut self, x: &mut Variant)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_variant(&mut self, x: &mut Variant)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_item_kind(&mut self, x: &mut ItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_item_kind(&mut self, x: &mut ItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_item_kind(&mut self, x: &mut ItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn enter_item(&mut self, x: &mut Item)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_item(&mut self, x: &mut Item)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_generic_constraint(&mut self, x: &mut GenericConstraint)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_generic_constraint(&mut self, x: &mut GenericConstraint)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_generic_constraint(&mut self, x: &mut GenericConstraint)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_error_node(&mut self, x: &mut ErrorNode)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_error_node(&mut self, x: &mut ErrorNode)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_error_node(&mut self, x: &mut ErrorNode)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_module(&mut self, x: &mut Module)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_module(&mut self, x: &mut Module)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_module(&mut self, x: &mut Module)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_expr_kind(&mut self, x: &mut ResugaredExprKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_expr_kind(&mut self, x: &mut ResugaredExprKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_expr_kind(&mut self, x: &mut ResugaredExprKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_ty_kind(&mut self, x: &mut ResugaredTyKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_ty_kind(&mut self, x: &mut ResugaredTyKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_ty_kind(&mut self, x: &mut ResugaredTyKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_pat_kind(&mut self, x: &mut ResugaredPatKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_pat_kind(&mut self, x: &mut ResugaredPatKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_pat_kind(&mut self, x: &mut ResugaredPatKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_impl_item_kind(&mut self, x: &mut ResugaredImplItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_impl_item_kind(&mut self, x: &mut ResugaredImplItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_impl_item_kind(&mut self, x: &mut ResugaredImplItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_trait_item_kind(&mut self, x: &mut ResugaredTraitItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_trait_item_kind(&mut self, x: &mut ResugaredTraitItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_trait_item_kind(&mut self, x: &mut ResugaredTraitItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_resugared_item_kind(&mut self, x: &mut ResugaredItemKind)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_resugared_item_kind(&mut self, x: &mut ResugaredItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_resugared_item_kind(&mut self, x: &mut ResugaredItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_span(&mut self, x: &mut Span)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_fragment(&mut self, x: &mut Fragment)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_global_id(&mut self, x: &mut GlobalId)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_diagnostic(&mut self, x: &mut Diagnostic)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_attr_payload(&mut self, x: &mut AttrPayload)

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

impl<T: HasSpan> HasSpan for ErrorWrapper<'_, T>

Source§

fn span(&self) -> Span

Get span
Source§

fn span_mut(&mut self) -> &mut Span

Mutable borrow on the span

Auto Trait Implementations§

§

impl<'a, V> !UnwindSafe for ErrorWrapper<'a, V>

§

impl<'a, V> Freeze for ErrorWrapper<'a, V>

§

impl<'a, V> RefUnwindSafe for ErrorWrapper<'a, V>
where V: RefUnwindSafe,

§

impl<'a, V> Send for ErrorWrapper<'a, V>
where V: Send,

§

impl<'a, V> Sync for ErrorWrapper<'a, V>
where V: Sync,

§

impl<'a, V> Unpin for ErrorWrapper<'a, V>

§

impl<'a, V> UnsafeUnpin for ErrorWrapper<'a, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, V> AstVisitableMut<'a, T> for V

Source§

fn visit(&mut self, e: &'a mut T)

Visit a value with the visitor.
Source§

impl<'a, V> AstVisitorMut<'a> for V
where V: AstVisitorMut,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more