pub struct FileMatch {
pub score: u32,
pub path: String,
pub indices: Option<Vec<u32>>,
}
Expand description
A single match result returned from the search.
score
– Relevance score returned bynucleo_matcher
.path
– Path to the matched file (relative to the search directory).indices
– Optional list of character indices that matched the query. These are only filled when the caller ofrun
setscompute_indices
totrue
. The indices vector follows the guidance fromnucleo_matcher::Pattern::indices
: they are unique and sorted in ascending order so that callers can use them directly for highlighting.
Fields§
§score: u32
§path: String
§indices: Option<Vec<u32>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileMatch
impl RefUnwindSafe for FileMatch
impl Send for FileMatch
impl Sync for FileMatch
impl Unpin for FileMatch
impl UnwindSafe for FileMatch
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