Skip to main content

try_splice_range

Function try_splice_range 

Source
pub fn try_splice_range(
    runs: &mut Vec<FormatRun>,
    range: Range<u32>,
    replacement: Vec<FormatRun>,
) -> Result<(), FormatRunError>
Expand description

splice_range, but the contract is checked and reported instead of asserted.

runs is left completely untouched when this returns Err — validation happens before any mutation, so a rejected splice cannot half-apply.