pub struct LineMatch {
pub path: PathBuf,
pub line: usize,
pub column: usize,
pub line_start: usize,
pub byte_start: usize,
pub byte_end: usize,
pub line_text: String,
pub matched_text: String,
pub word_bounded: bool,
}Expand description
A single matching line within a file.
Fields§
§path: PathBufPath of the file the match was found in.
line: usizeOne-based line number of the match.
column: usizeOne-based byte column of the match start, counted from the start of
the line, matching rg --column.
line_start: usizeByte offset of the start of the matching line within the file.
This is the anchor for the line-relative match offsets, exactly like
ripgrep’s absolute_offset.
byte_start: usizeByte offset of the match start within the file.
byte_end: usizeByte offset of the match end within the file.
line_text: StringThe text of the matching line, without its trailing newline.
matched_text: StringThe matched substring itself.
word_bounded: boolWhether the match is a whole word.
A match is word-bounded when the characters immediately before and
after it are not identifier characters, so Widget inside
WidgetExtra is not word-bounded.
Trait Implementations§
impl Eq for LineMatch
impl StructuralPartialEq for LineMatch
Auto Trait Implementations§
impl Forget for LineMatch
impl Freeze for LineMatch
impl Move for LineMatch
impl RefUnwindSafe for LineMatch
impl Send for LineMatch
impl Sync for LineMatch
impl Unpin for LineMatch
impl UnsafeUnpin for LineMatch
impl UnwindSafe for LineMatch
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.