pub trait Foldable<A: AstTypes, B: AstTypes>: Sized {
type Out;
// Required methods
fn fold_in<F: Fold<A, B> + ?Sized>(
self,
folder: &mut F,
) -> Result<Self::Out, F::Error>;
fn children<F: Fold<A, B> + ?Sized>(
self,
folder: &mut F,
) -> Result<Self::Out, F::Error>;
}Expand description
Implements depth-first traversal for folders
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.