pub enum FsGrepRecord {
File {
flags: u8,
n: u16,
path: String,
},
Match {
line: u32,
col: u32,
end_line: u32,
end_col: u32,
text: String,
},
}Expand description
One record of an FS_GREP response.
Variants§
File
FILE 0x01: [kind:1][flags:1][n:2][path_len:2][path:N] — the next n
Match records belong to this file. flags is FS_GREP_FILE_IGNORED.
Match
MATCH 0x02: [kind:1][line:4][col:4][end_line:4][end_col:4][text_len:4][text:N].
0-based lines, UTF-8 byte columns — the same shape as an LSP range.
end_line differs from line when the pattern matched across a
newline; text then carries every line the match spans, joined by
\n, so a client can show the whole thing rather than a fragment.
Trait Implementations§
Source§impl Clone for FsGrepRecord
impl Clone for FsGrepRecord
Source§fn clone(&self) -> FsGrepRecord
fn clone(&self) -> FsGrepRecord
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 moreSource§impl Debug for FsGrepRecord
impl Debug for FsGrepRecord
impl Eq for FsGrepRecord
Source§impl PartialEq for FsGrepRecord
impl PartialEq for FsGrepRecord
impl StructuralPartialEq for FsGrepRecord
Auto Trait Implementations§
impl Freeze for FsGrepRecord
impl RefUnwindSafe for FsGrepRecord
impl Send for FsGrepRecord
impl Sync for FsGrepRecord
impl Unpin for FsGrepRecord
impl UnsafeUnpin for FsGrepRecord
impl UnwindSafe for FsGrepRecord
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