pub struct BinaryCodec;Expand description
Codec that treats every binary change as a whole-object replacement.
Trait Implementations§
Source§impl Codec for BinaryCodec
impl Codec for BinaryCodec
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 BinaryCodec
impl RefUnwindSafe for BinaryCodec
impl Send for BinaryCodec
impl Sync for BinaryCodec
impl Unpin for BinaryCodec
impl UnsafeUnpin for BinaryCodec
impl UnwindSafe for BinaryCodec
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