pub enum EmbeddingCacheMsg {
Get {
key: Vec<u8>,
reply: Sender<Option<Vec<f32>>>,
},
Insert {
key: Vec<u8>,
value: Vec<f32>,
reply: Sender<()>,
},
Invalidate {
key: Vec<u8>,
reply: Sender<bool>,
},
Stats {
reply: Sender<CacheStats>,
},
}Variants§
Get
Try the cache. On miss, returns None and the caller is
responsible for computing + storing the embedding via
Insert. F4 keeps cache and compute decoupled.
Insert
Invalidate
Stats
Fields
§
reply: Sender<CacheStats>Auto Trait Implementations§
impl Freeze for EmbeddingCacheMsg
impl !RefUnwindSafe for EmbeddingCacheMsg
impl Send for EmbeddingCacheMsg
impl Sync for EmbeddingCacheMsg
impl Unpin for EmbeddingCacheMsg
impl UnsafeUnpin for EmbeddingCacheMsg
impl !UnwindSafe for EmbeddingCacheMsg
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