pub struct WhileElseDesugar;Expand description
Desugars while-else expressions into loop-if-else-break expressions
Trait Implementations§
Source§impl<A: AstTypes> Fold<A> for WhileElseDesugar
impl<A: AstTypes> Fold<A> for WhileElseDesugar
type Error = ()
Source§fn fold_annotation(
&mut self,
anno: <A as AstTypes>::Annotation,
) -> Result<<A as AstTypes>::Annotation, Self::Error>
fn fold_annotation( &mut self, anno: <A as AstTypes>::Annotation, ) -> Result<<A as AstTypes>::Annotation, Self::Error>
Consumes an Annotation in A, possibly transforms it, and produces a replacement Annotation
in B
Source§fn fold_macro_id(
&mut self,
name: <A as AstTypes>::MacroId,
) -> Result<<A as AstTypes>::MacroId, Self::Error>
fn fold_macro_id( &mut self, name: <A as AstTypes>::MacroId, ) -> Result<<A as AstTypes>::MacroId, Self::Error>
Consumes a
MacroId in A, possibly transforms it, and produces a replacement MacroId in BSource§fn fold_symbol(
&mut self,
name: <A as AstTypes>::Symbol,
) -> Result<<A as AstTypes>::Symbol, Self::Error>
fn fold_symbol( &mut self, name: <A as AstTypes>::Symbol, ) -> Result<<A as AstTypes>::Symbol, Self::Error>
Consumes a
Symbol in A, possibly transforms it, and produces a replacement Symbol in BSource§fn fold_path(
&mut self,
path: <A as AstTypes>::Path,
) -> Result<<A as AstTypes>::Path, Self::Error>
fn fold_path( &mut self, path: <A as AstTypes>::Path, ) -> Result<<A as AstTypes>::Path, Self::Error>
Consumes a
Path in A, possibly transforms it, and produces a replacement Path in BSource§fn fold_literal(
&mut self,
lit: <A as AstTypes>::Literal,
) -> Result<<A as AstTypes>::Literal, Self::Error>
fn fold_literal( &mut self, lit: <A as AstTypes>::Literal, ) -> Result<<A as AstTypes>::Literal, Self::Error>
Consumes a
Literal in A, possibly transforms it, and produces a replacement Literal in BSource§fn fold_at_expr(
&mut self,
expr: At<Expr<A>, A>,
) -> Result<At<Expr<A>, A>, Self::Error>
fn fold_at_expr( &mut self, expr: At<Expr<A>, A>, ) -> Result<At<Expr<A>, A>, Self::Error>
Folds an annotated expression, so the expression and annotation can be seen at once.
Source§fn fold_at_pat(
&mut self,
pat: At<Pat<From>, From>,
) -> Result<At<Pat<To>, To>, Self::Error>
fn fold_at_pat( &mut self, pat: At<Pat<From>, From>, ) -> Result<At<Pat<To>, To>, Self::Error>
Folds an annotated pattern, so the pattern and annotation can be seen at once.
Auto Trait Implementations§
impl Freeze for WhileElseDesugar
impl RefUnwindSafe for WhileElseDesugar
impl Send for WhileElseDesugar
impl Sync for WhileElseDesugar
impl Unpin for WhileElseDesugar
impl UnsafeUnpin for WhileElseDesugar
impl UnwindSafe for WhileElseDesugar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more