pub struct ContentMatch {
pub entry: Entry,
pub line_number: usize,
pub column: usize,
pub matched_text: String,
pub context_before: Vec<String>,
pub context_after: Vec<String>,
}Expand description
Represents a content match from grep/search operations
Fields§
§entry: EntryThe entry containing the match
line_number: usizeLine number where match was found (1-indexed)
column: usizeColumn where match starts (1-indexed)
matched_text: StringThe matched text/line
context_before: Vec<String>Lines before the match for context
context_after: Vec<String>Lines after the match for context
Trait Implementations§
Source§impl Clone for ContentMatch
impl Clone for ContentMatch
Source§fn clone(&self) -> ContentMatch
fn clone(&self) -> ContentMatch
Returns a duplicate of the value. Read more
1.0.0 · 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 ContentMatch
impl Debug for ContentMatch
Source§impl<'de> Deserialize<'de> for ContentMatch
impl<'de> Deserialize<'de> for ContentMatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContentMatch
impl RefUnwindSafe for ContentMatch
impl Send for ContentMatch
impl Sync for ContentMatch
impl Unpin for ContentMatch
impl UnwindSafe for ContentMatch
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more