pub struct Bubbler(pub bool);Expand description
The Bubbler separates Patterns into their value and type-annotation components, “bubbling” PatOp::Typed annotations up to the top of all pattern-expressions.
Its bool argument tracks whether or not it’s inside of a BindOp::Enum expression,
which gets different binding rules.
Tuple Fields§
§0: boolTrait Implementations§
Source§impl Fold<DefaultTypes> for Bubbler
impl Fold<DefaultTypes> for Bubbler
type Error = Infallible
Source§fn fold_annotation(
&mut self,
anno: <DefaultTypes as AstTypes>::Annotation,
) -> Result<<DefaultTypes as AstTypes>::Annotation, Self::Error>
fn fold_annotation( &mut self, anno: <DefaultTypes as AstTypes>::Annotation, ) -> Result<<DefaultTypes 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: <DefaultTypes as AstTypes>::MacroId,
) -> Result<<DefaultTypes as AstTypes>::MacroId, Self::Error>
fn fold_macro_id( &mut self, name: <DefaultTypes as AstTypes>::MacroId, ) -> Result<<DefaultTypes 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: <DefaultTypes as AstTypes>::Symbol,
) -> Result<<DefaultTypes as AstTypes>::Symbol, Self::Error>
fn fold_symbol( &mut self, name: <DefaultTypes as AstTypes>::Symbol, ) -> Result<<DefaultTypes 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: <DefaultTypes as AstTypes>::Path,
) -> Result<<DefaultTypes as AstTypes>::Path, Self::Error>
fn fold_path( &mut self, path: <DefaultTypes as AstTypes>::Path, ) -> Result<<DefaultTypes 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: <DefaultTypes as AstTypes>::Literal,
) -> Result<<DefaultTypes as AstTypes>::Literal, Self::Error>
fn fold_literal( &mut self, lit: <DefaultTypes as AstTypes>::Literal, ) -> Result<<DefaultTypes as AstTypes>::Literal, Self::Error>
Consumes a
Literal in A, possibly transforms it, and produces a replacement Literal in BSource§fn fold_at_pat(
&mut self,
pat: At<Pat<DefaultTypes>, DefaultTypes>,
) -> Result<At<Pat<DefaultTypes>, DefaultTypes>, Self::Error>
fn fold_at_pat( &mut self, pat: At<Pat<DefaultTypes>, DefaultTypes>, ) -> Result<At<Pat<DefaultTypes>, DefaultTypes>, Self::Error>
Folds an annotated pattern, so the pattern and annotation can be seen at once.
Source§fn fold_bind(
&mut self,
bind: Bind<DefaultTypes>,
) -> Result<Bind<DefaultTypes>, Self::Error>
fn fold_bind( &mut self, bind: Bind<DefaultTypes>, ) -> Result<Bind<DefaultTypes>, Self::Error>
Source§fn fold_at_expr(
&mut self,
expr: At<Expr<From>, From>,
) -> Result<At<Expr<To>, To>, Self::Error>
fn fold_at_expr( &mut self, expr: At<Expr<From>, From>, ) -> Result<At<Expr<To>, To>, Self::Error>
Folds an annotated expression, so the expression and annotation can be seen at once.
Source§impl Ord for Bubbler
impl Ord for Bubbler
Source§impl PartialOrd for Bubbler
impl PartialOrd for Bubbler
impl Copy for Bubbler
impl Eq for Bubbler
impl StructuralPartialEq for Bubbler
Auto Trait Implementations§
impl Freeze for Bubbler
impl RefUnwindSafe for Bubbler
impl Send for Bubbler
impl Sync for Bubbler
impl Unpin for Bubbler
impl UnsafeUnpin for Bubbler
impl UnwindSafe for Bubbler
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