pub struct WorktreeSnippets { /* private fields */ }Expand description
Reads snippets out of a worktree, caching each file it touches.
A scan produces many findings in few files, so the cache turns a read per
finding into a read per file. It is bounded by
WorktreeSnippets::MAX_FILE_BYTES per file: a report naming a huge
generated file must not be able to make Roteiro read it into memory.
Implementations§
Source§impl WorktreeSnippets
impl WorktreeSnippets
Sourcepub const MAX_FILE_BYTES: u64
pub const MAX_FILE_BYTES: u64
Largest file a snippet will be read from. Beyond this the snippet is unavailable and the identity says so, which is a better outcome than buffering an arbitrary file because a report asked.
Trait Implementations§
Source§impl Debug for WorktreeSnippets
impl Debug for WorktreeSnippets
Auto Trait Implementations§
impl !Freeze for WorktreeSnippets
impl !RefUnwindSafe for WorktreeSnippets
impl !Sync for WorktreeSnippets
impl Send for WorktreeSnippets
impl Unpin for WorktreeSnippets
impl UnsafeUnpin for WorktreeSnippets
impl UnwindSafe for WorktreeSnippets
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