pub struct Patch<'a> {
pub start_offset: usize,
pub end_offset: usize,
pub replacement: Cow<'a, str>,
}Expand description
One source-preserving replacement over UTF-8 byte offsets.
Fields§
§start_offset: usizeInclusive replacement start byte.
end_offset: usizeExclusive replacement end byte.
replacement: Cow<'a, str>Replacement text.
Implementations§
Trait Implementations§
impl<'a> Eq for Patch<'a>
impl<'a> StructuralPartialEq for Patch<'a>
Auto Trait Implementations§
impl<'a> Freeze for Patch<'a>
impl<'a> RefUnwindSafe for Patch<'a>
impl<'a> Send for Patch<'a>
impl<'a> Sync for Patch<'a>
impl<'a> Unpin for Patch<'a>
impl<'a> UnsafeUnpin for Patch<'a>
impl<'a> UnwindSafe for Patch<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.