pub struct ExtractionCache { /* private fields */ }Expand description
Cache of per-file extraction results keyed by path.
IDs inside the cached extractions stay valid. New extractions must start
above ExtractionCache::max_symbol_id.
Implementations§
Source§impl ExtractionCache
impl ExtractionCache
Sourcepub fn fingerprint_of(&self, path: &Path) -> Option<Fingerprint>
pub fn fingerprint_of(&self, path: &Path) -> Option<Fingerprint>
Cached fingerprint for a path.
Sourcepub fn max_symbol_id(&self) -> u32
pub fn max_symbol_id(&self) -> u32
Find the highest raw symbol ID allocated across all cached files.
Sourcepub fn update(
&mut self,
path: PathBuf,
fp: Fingerprint,
extraction: Arc<FileExtraction>,
)
pub fn update( &mut self, path: PathBuf, fp: Fingerprint, extraction: Arc<FileExtraction>, )
Update or insert a file’s fingerprint and shared extraction.
Trait Implementations§
Source§impl Debug for ExtractionCache
impl Debug for ExtractionCache
Source§impl Default for ExtractionCache
impl Default for ExtractionCache
Source§fn default() -> ExtractionCache
fn default() -> ExtractionCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtractionCache
impl RefUnwindSafe for ExtractionCache
impl Send for ExtractionCache
impl Sync for ExtractionCache
impl Unpin for ExtractionCache
impl UnsafeUnpin for ExtractionCache
impl UnwindSafe for ExtractionCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more