Skip to main content

Module structural_mutate

Module structural_mutate 

Source
Expand description

Native Rust structural mutation and mapping.

structural_mutate lets a mutator drive recursion, while structural_map applies callbacks around engine-owned recursion.

Re-exports§

pub use super::unchanged::Unchanged;
pub use super::unchanged::UnchangedOr;
pub use super::StructuralView;

Structs§

DefaultMutContextPolicy
Default descent through registered hooks or reflected structural fields.
InplaceValue
Engine-issued permission to attempt in-place mutation of one value.
MapWithContextPolicy
A MapDispatch with a MutContextPolicy, sharing the dispatcher’s state.
MutateCallbacks
A reusable typed-dispatch or callback mutator with shared user state.
MutateContext
State and recursive operations shared by mutation callbacks and context policies.
MutateValue
A callback value carrying the engine’s in-place permission.
Mutator
Recursion control passed to a typed #[dispatch(mutate)] handler.
StructuralVarRemap
Identity substitutions for a custom StructuralMutator remapping policy.

Enums§

InplaceMode
Permission to attempt in-place structural mutation along an owned path.

Traits§

IntoMapper
Conversion into the mapper consumed by structural_map.
IntoMutator
Conversion into the mutator argument accepted by structural_mutate.
MapChainLink
One typed callback in a structural-map tuple.
MapDispatch
Ordered typed replacement dispatch for structural_map.
MutContextPolicy
Default-recursion policy for MutateCallbacks::with_policy and MapWithContextPolicy.
MutateChainLink
One typed callback in a callback-driven structural mutator.
MutateDispatch
Ordered typed callback dispatch for structural_mutate.
StructuralMutator
A low-level mutator that controls its own recursion.

Functions§

structural_map
Transform a structured value graph with ordered replacement callbacks.
structural_mutate
Mutate a structured value with a mutator or typed callback chain.