pub struct TextLineCodec;Expand description
Codec for UTF-8 text using line-based patch addresses.
Trait Implementations§
Source§impl Codec for TextLineCodec
impl Codec for TextLineCodec
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 TextLineCodec
impl RefUnwindSafe for TextLineCodec
impl Send for TextLineCodec
impl Sync for TextLineCodec
impl Unpin for TextLineCodec
impl UnsafeUnpin for TextLineCodec
impl UnwindSafe for TextLineCodec
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