Skip to main content

accept_changes

Function accept_changes 

Source
pub fn accept_changes(
    docx: &[u8],
    filter: &ChangeFilter,
) -> Result<Vec<u8>, ChangeError>
Expand description

Accept the changes filter selects; the others stay tracked. A Strict package is written back transitional, as the comparer writes it; with nothing selected the bytes come back untouched.

§Errors

ChangeError::InvalidId for an id filter accepts that is not a change id; ChangeError::UnknownChange for an id not present in the document; ChangeError::Ambiguous for an id that names more than one listed change; ChangeError::PartOfChange when the ids name only some of the marks of a logical change (list_logical_changes), so that it would be half settled (accept_elements settles marks one by one); ChangeError::Package when the package cannot be read or rewritten; ChangeError::ExposedFinalMark when settling the selection would leave w:ins or w:del on a container’s final paragraph mark that was not already final (#1693).