pub struct Diff {
pub patch: Value,
pub forced_snapshot: bool,
}Expand description
The result of diffing a value into an RFC 7396 merge patch.
Fields§
§patch: ValueA merge patch that transforms the old value into the new one.
forced_snapshot: boolSet when the change can’t be faithfully expressed as a merge patch, so the caller should publish a full snapshot instead. This happens when a value is set to JSON null, which merge patch reads as a key deletion, or when the root is not an object. Arrays are fine: merge patch replaces them wholesale, which is still typically smaller than a full snapshot.
Auto Trait Implementations§
impl Freeze for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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