Skip to main content

apply

Function apply 

Source
pub fn apply(doc: Document, patch: &Patch) -> Result<Document, DiffError>
Expand description

Apply a patch to a document, returning the new document.

Not all patch operations are supported by apply. Unsupported operations cause the function to return an error describing which one failed.