pub struct EmbeddingCacheEntry {
pub text: String,
pub text_hash: String,
pub embedding: Vec<f32>,
pub model: String,
pub metadata: CacheEntryMetadata,
}Expand description
Embedding cache entry
Fields§
§text: StringInput text
text_hash: StringText hash for verification
embedding: Vec<f32>Computed embedding
model: StringModel used for embedding
metadata: CacheEntryMetadataMetadata
Trait Implementations§
Source§impl Cache<String, EmbeddingCacheEntry> for EmbeddingCache
impl Cache<String, EmbeddingCacheEntry> for EmbeddingCache
Source§fn put(&mut self, key: String, value: EmbeddingCacheEntry) -> RragResult<()>
fn put(&mut self, key: String, value: EmbeddingCacheEntry) -> RragResult<()>
Put value into cache
Source§fn stats(&self) -> CacheStats
fn stats(&self) -> CacheStats
Get cache statistics
Source§impl Clone for EmbeddingCacheEntry
impl Clone for EmbeddingCacheEntry
Source§fn clone(&self) -> EmbeddingCacheEntry
fn clone(&self) -> EmbeddingCacheEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmbeddingCacheEntry
impl Debug for EmbeddingCacheEntry
Source§impl<'de> Deserialize<'de> for EmbeddingCacheEntry
impl<'de> Deserialize<'de> for EmbeddingCacheEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingCacheEntry
impl RefUnwindSafe for EmbeddingCacheEntry
impl Send for EmbeddingCacheEntry
impl Sync for EmbeddingCacheEntry
impl Unpin for EmbeddingCacheEntry
impl UnwindSafe for EmbeddingCacheEntry
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