pub struct IndexCache { /* private fields */ }
Expand description
Index cache manager with LRU eviction and intelligent validation
Implementations§
Source§impl IndexCache
impl IndexCache
Sourcepub fn new(config: IndexCacheConfig) -> Result<Self, BinaryExportError>
pub fn new(config: IndexCacheConfig) -> Result<Self, BinaryExportError>
Create a new index cache with the given configuration
Sourcepub fn with_default_config() -> Result<Self, BinaryExportError>
pub fn with_default_config() -> Result<Self, BinaryExportError>
Create a new index cache with default configuration
Sourcepub fn get_or_build_index<P: AsRef<Path>>(
&mut self,
file_path: P,
builder: &BinaryIndexBuilder,
) -> Result<BinaryIndex, BinaryExportError>
pub fn get_or_build_index<P: AsRef<Path>>( &mut self, file_path: P, builder: &BinaryIndexBuilder, ) -> Result<BinaryIndex, BinaryExportError>
Get or build an index for the specified file
Sourcepub fn get_stats(&self) -> &CacheStats
pub fn get_stats(&self) -> &CacheStats
Get cache statistics
Sourcepub fn clear(&mut self) -> Result<(), BinaryExportError>
pub fn clear(&mut self) -> Result<(), BinaryExportError>
Clear all cache entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexCache
impl RefUnwindSafe for IndexCache
impl Send for IndexCache
impl Sync for IndexCache
impl Unpin for IndexCache
impl UnwindSafe for IndexCache
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