pub struct VectorEntry {
pub id: String,
pub embedding: Embedding,
pub metadata: HashMap<String, Value>,
pub content: Option<String>,
pub namespace: Option<String>,
}Expand description
A vector entry in the database
Fields§
§id: StringUnique identifier
embedding: EmbeddingThe embedding vector
metadata: HashMap<String, Value>Associated metadata
content: Option<String>Optional text content (for RAG applications)
namespace: Option<String>Namespace for multi-tenant isolation
Implementations§
Source§impl VectorEntry
impl VectorEntry
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<Value>,
) -> Self
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
Add metadata
Sourcepub fn with_content(self, content: impl Into<String>) -> Self
pub fn with_content(self, content: impl Into<String>) -> Self
Set content
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Set namespace
Trait Implementations§
Source§impl Clone for VectorEntry
impl Clone for VectorEntry
Source§fn clone(&self) -> VectorEntry
fn clone(&self) -> VectorEntry
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 VectorEntry
impl Debug for VectorEntry
Source§impl<'de> Deserialize<'de> for VectorEntry
impl<'de> Deserialize<'de> for VectorEntry
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 VectorEntry
impl RefUnwindSafe for VectorEntry
impl Send for VectorEntry
impl Sync for VectorEntry
impl Unpin for VectorEntry
impl UnwindSafe for VectorEntry
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