pub struct SubstituteMatch {
pub row: u32,
pub byte_start: u32,
pub byte_end: u32,
pub replacement: String,
}Expand description
A single candidate match discovered by collect_substitute_matches.
Positions are 0-based byte offsets within their line. The replacement
field already has all capture-group references expanded (e.g. $1) to
their literal values so the caller can display it and apply without
running the regex again.
Fields§
§row: u320-based row index in the buffer.
byte_start: u32Byte offset of the first byte of the match within that row’s text.
byte_end: u32Byte offset one past the last byte of the match (exclusive).
replacement: StringThe literal replacement string (captures expanded).
Trait Implementations§
Source§impl Clone for SubstituteMatch
impl Clone for SubstituteMatch
Source§fn clone(&self) -> SubstituteMatch
fn clone(&self) -> SubstituteMatch
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 SubstituteMatch
impl Debug for SubstituteMatch
Source§impl PartialEq for SubstituteMatch
impl PartialEq for SubstituteMatch
Source§fn eq(&self, other: &SubstituteMatch) -> bool
fn eq(&self, other: &SubstituteMatch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SubstituteMatch
impl StructuralPartialEq for SubstituteMatch
Auto Trait Implementations§
impl Freeze for SubstituteMatch
impl RefUnwindSafe for SubstituteMatch
impl Send for SubstituteMatch
impl Sync for SubstituteMatch
impl Unpin for SubstituteMatch
impl UnsafeUnpin for SubstituteMatch
impl UnwindSafe for SubstituteMatch
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