Skip to main content

replace_scalar

Function replace_scalar 

Source
pub fn replace_scalar(
    input: &str,
    path: &[PathSegment],
    replacement: &Value,
) -> Result<VerifiedEdit, EditError>
Expand description

Replace the scalar at path with replacement, verifying both the resulting value tree and event stream before returning.

ยงErrors

Returns EditError if the input fails to parse, path cannot be found, the document or target uses an unsupported construct, or post-edit verification fails.