pub struct TextDocument {
pub id: String,
pub text: String,
pub metadata: Option<HashMap<String, Value>>,
pub ttl_seconds: Option<u64>,
}Expand description
A text document to upsert with automatic embedding generation.
Fields§
§id: StringUnique identifier for the document.
text: StringRaw text content to be embedded.
metadata: Option<HashMap<String, Value>>Optional metadata for the document.
ttl_seconds: Option<u64>Optional TTL in seconds.
Implementations§
Trait Implementations§
Source§impl Clone for TextDocument
impl Clone for TextDocument
Source§fn clone(&self) -> TextDocument
fn clone(&self) -> TextDocument
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 TextDocument
impl Debug for TextDocument
Source§impl<'de> Deserialize<'de> for TextDocument
impl<'de> Deserialize<'de> for TextDocument
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 TextDocument
impl RefUnwindSafe for TextDocument
impl Send for TextDocument
impl Sync for TextDocument
impl Unpin for TextDocument
impl UnsafeUnpin for TextDocument
impl UnwindSafe for TextDocument
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