pub struct TextPatch { /* private fields */ }Implementations§
Source§impl TextPatch
impl TextPatch
pub fn new( start: usize, end: usize, replacement: impl Into<String>, ) -> Result<Self, TextPatchError>
pub fn insert(offset: usize, replacement: impl Into<String>) -> Self
pub fn delete(start: usize, end: usize) -> Result<Self, TextPatchError>
pub fn replace( start: usize, end: usize, replacement: impl Into<String>, ) -> Result<Self, TextPatchError>
pub fn start(&self) -> usize
pub fn end(&self) -> usize
pub fn replacement(&self) -> &str
Trait Implementations§
impl Eq for TextPatch
impl StructuralPartialEq for TextPatch
Auto Trait Implementations§
impl Freeze for TextPatch
impl RefUnwindSafe for TextPatch
impl Send for TextPatch
impl Sync for TextPatch
impl Unpin for TextPatch
impl UnsafeUnpin for TextPatch
impl UnwindSafe for TextPatch
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