pub struct MemoryRerankCache { /* private fields */ }Expand description
LRU 内存缓存实现
Implementations§
Trait Implementations§
Source§impl Debug for MemoryRerankCache
impl Debug for MemoryRerankCache
Source§impl RerankCache for MemoryRerankCache
impl RerankCache for MemoryRerankCache
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
candidate_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Option<RerankResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
candidate_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Option<RerankResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
获取缓存结果
Source§fn set<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
candidate_ids: &'life2 [String],
result: &'life3 RerankResult,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
candidate_ids: &'life2 [String],
result: &'life3 RerankResult,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
存储缓存结果
Auto Trait Implementations§
impl !Freeze for MemoryRerankCache
impl !RefUnwindSafe for MemoryRerankCache
impl Send for MemoryRerankCache
impl Sync for MemoryRerankCache
impl Unpin for MemoryRerankCache
impl UnsafeUnpin for MemoryRerankCache
impl UnwindSafe for MemoryRerankCache
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