pub trait Transform<'a, 'ctx, M: NodeMetadata, N: NodeWithMetadata<M>, F: TransformerFeatures<M, N>> {
// Required methods
fn skips_subtree(metadata: &M) -> bool;
fn new(transformer: &'ctx Transformer<'a, M, N, F>) -> Self;
}Required Methods§
Sourcefn skips_subtree(metadata: &M) -> bool
fn skips_subtree(metadata: &M) -> bool
Returns true when a subtree described by metadata cannot contain anything this transform
rewrites.
Transformer asks this of the root node before running the transform at all, and the
transform asks it of every queryable node it enters, pruning the subtree when it holds.
Metadata aggregates upwards, so a kind absent from metadata is absent from the whole
subtree: answering true for a subtree that does contain such a node silently skips work.
fn new(transformer: &'ctx Transformer<'a, M, N, F>) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".