pub fn structural_replace(
pages: &[DocumentRef<'_>],
pattern: &StructuralMatch,
action: &StructuralAction,
expected_count: Option<usize>,
ids: &dyn IdGenerator,
) -> Result<StructuralReplaceResult, EditError>Expand description
Applies action to each block of pages that pattern matches, by the page tool’s rules.
Fails without changing anything when expected_count differs from the matches.