Skip to main content

structural_mutate

Function structural_mutate 

Source
pub fn structural_mutate<R, M>(
    root: R,
    mutator: impl IntoMutator<M>,
) -> Result<Any>
where R: Into<Any>,
Expand description

Mutate a structured value with a mutator or typed callback chain.

The root is consumed to establish the ownership boundary for optional in-place mutation. A matching callback supplies the final value; unmatched values use default mutation.