tvm_ffi::extra::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 an owned or borrowed Dispatcher.

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.