pub struct SearchMatch {
pub entry_index: usize,
pub entry_type: EntryType,
pub line_number: usize,
pub excerpt: String,
pub full_line: String,
}Expand description
Search match result with context
Fields§
§entry_index: usizeZero-based entry index in session
entry_type: EntryTypeEntry type (user/assistant)
line_number: usizeLine number within entry content (zero-based)
excerpt: StringMatched line with surrounding context Format: “…{50 chars before}MATCH{50 chars after}…”
full_line: StringFull matched line (without truncation)
Implementations§
Source§impl SearchMatch
impl SearchMatch
Sourcepub fn new(
entry_index: usize,
entry_type: EntryType,
line_number: usize,
full_line: String,
) -> Self
pub fn new( entry_index: usize, entry_type: EntryType, line_number: usize, full_line: String, ) -> Self
Create new search match
Sourcepub fn entry_index(&self) -> usize
pub fn entry_index(&self) -> usize
Get entry index
Sourcepub fn entry_type(&self) -> EntryType
pub fn entry_type(&self) -> EntryType
Get entry type
Sourcepub fn line_number(&self) -> usize
pub fn line_number(&self) -> usize
Get line number
Trait Implementations§
Source§impl Clone for SearchMatch
impl Clone for SearchMatch
Source§fn clone(&self) -> SearchMatch
fn clone(&self) -> SearchMatch
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 moreAuto Trait Implementations§
impl Freeze for SearchMatch
impl RefUnwindSafe for SearchMatch
impl Send for SearchMatch
impl Sync for SearchMatch
impl Unpin for SearchMatch
impl UnsafeUnpin for SearchMatch
impl UnwindSafe for SearchMatch
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