pub struct JsonTreeCodec;Expand description
Codec that diffs JSON values by path and merges non-overlapping object edits.
Trait Implementations§
Source§impl Codec for JsonTreeCodec
impl Codec for JsonTreeCodec
Source§fn diff(&self, old: &[u8], new: &[u8]) -> Result<Vec<PatchOp>, PatchError>
fn diff(&self, old: &[u8], new: &[u8]) -> Result<Vec<PatchOp>, PatchError>
Build patch operations that transform
old bytes into new bytes.Source§fn apply(&self, base: &[u8], ops: &[PatchOp]) -> Result<Vec<u8>, PatchError>
fn apply(&self, base: &[u8], ops: &[PatchOp]) -> Result<Vec<u8>, PatchError>
Apply patch operations to
base bytes.Source§fn invert(&self, ops: &[PatchOp]) -> Result<Vec<PatchOp>, PatchError>
fn invert(&self, ops: &[PatchOp]) -> Result<Vec<PatchOp>, PatchError>
Return operations that undo the provided operations.
Auto Trait Implementations§
impl Freeze for JsonTreeCodec
impl RefUnwindSafe for JsonTreeCodec
impl Send for JsonTreeCodec
impl Sync for JsonTreeCodec
impl Unpin for JsonTreeCodec
impl UnsafeUnpin for JsonTreeCodec
impl UnwindSafe for JsonTreeCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more