pub struct ReplaceRange {
pub position: usize,
pub length: usize,
pub replacement: String,
}Expand description
One range to replace, with its own replacement text.
position and length are char offsets into the document’s text — the same space
FindMatch reports in, so a match can be turned into a range directly.
Fields§
§position: usize§length: usize§replacement: StringTrait Implementations§
Source§impl Clone for ReplaceRange
impl Clone for ReplaceRange
Source§fn clone(&self) -> ReplaceRange
fn clone(&self) -> ReplaceRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReplaceRange
impl Debug for ReplaceRange
impl Eq for ReplaceRange
Source§impl PartialEq for ReplaceRange
impl PartialEq for ReplaceRange
impl StructuralPartialEq for ReplaceRange
Auto Trait Implementations§
impl Freeze for ReplaceRange
impl RefUnwindSafe for ReplaceRange
impl Send for ReplaceRange
impl Sync for ReplaceRange
impl Unpin for ReplaceRange
impl UnsafeUnpin for ReplaceRange
impl UnwindSafe for ReplaceRange
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.