pub fn apply(patch_text: &str, vfs: &Vfs) -> Result<Vfs, ZenpatchError>Expand description
Applies a text-based patch to a Virtual File System (VFS) and returns the new VFS.
This is the primary public API for the zenpatch crate. It handles patch
parsing and application for multiple file operations within a single patch.
§Arguments
patch_text- A string slice containing the patch in the expected format.vfs- A reference to the initial Virtual File System.
§Returns
Ok(Vfs)- The patched VFS on success.Err(ZenpatchError)- An error if parsing or application fails.