pub struct CacheContextBridge { /* private fields */ }Expand description
Creates bridging sentences for smooth cache context transitions
Implementations§
Source§impl CacheContextBridge
impl CacheContextBridge
Sourcepub fn create_clear_bridge(
&mut self,
cleared_count: usize,
preserved_count: usize,
keywords: &[String],
) -> String
pub fn create_clear_bridge( &mut self, cleared_count: usize, preserved_count: usize, keywords: &[String], ) -> String
Create a bridge message when cache is cleared
Sourcepub fn create_retrieval_bridge(
&mut self,
retrieved_count: usize,
source_tier: u8,
keywords: &[String],
similarity_score: Option<f32>,
) -> String
pub fn create_retrieval_bridge( &mut self, retrieved_count: usize, source_tier: u8, keywords: &[String], similarity_score: Option<f32>, ) -> String
Create a bridge message when content is retrieved
Sourcepub fn create_restore_bridge(
&mut self,
restored_count: usize,
snapshot_age: Option<Duration>,
) -> String
pub fn create_restore_bridge( &mut self, restored_count: usize, snapshot_age: Option<Duration>, ) -> String
Create a bridge message when cache is restored
Sourcepub fn get_stats(&self) -> CacheBridgeStats
pub fn get_stats(&self) -> CacheBridgeStats
Get transition statistics
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear transition history
Auto Trait Implementations§
impl Freeze for CacheContextBridge
impl RefUnwindSafe for CacheContextBridge
impl Send for CacheContextBridge
impl Sync for CacheContextBridge
impl Unpin for CacheContextBridge
impl UnsafeUnpin for CacheContextBridge
impl UnwindSafe for CacheContextBridge
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