pub struct CodeMatch {
pub repo: String,
pub path: String,
pub sha: String,
pub branch: String,
pub matches: Vec<String>,
pub located: bool,
pub line: Option<u32>,
}Expand description
One code-search hit. matches are the matched substrings — an
empty vec is a legal path-only hit (“this file matched”). When
matches is non-empty the UI locates them in the blob for real
line numbers; line, when the provider knows it, is the anchor
used as-is (the first occurrence of a substring is often not the
occurrence that matched).
Fields§
§repo: String§path: String§sha: String§branch: String§matches: Vec<String>§located: boolv1.1: provider knows its index is stale for this hit (the UI shows a stale chip until client-side locating self-heals).
line: Option<u32>v1.3: provider-known line number (1-based); None = unknown,
the UI locates or anchors at 1.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeMatch
impl RefUnwindSafe for CodeMatch
impl Send for CodeMatch
impl Sync for CodeMatch
impl Unpin for CodeMatch
impl UnsafeUnpin for CodeMatch
impl UnwindSafe for CodeMatch
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