pub struct DocumentChunk {
pub id: String,
pub content: String,
pub metadata: HashMap<String, Value>,
pub embedding: Vec<f32>,
}Expand description
Document chunk for RAG indexing
Fields§
§id: StringChunk ID
content: StringContent text
metadata: HashMap<String, Value>Metadata
embedding: Vec<f32>Embedding vector for semantic search
Trait Implementations§
Source§impl Clone for DocumentChunk
impl Clone for DocumentChunk
Source§fn clone(&self) -> DocumentChunk
fn clone(&self) -> DocumentChunk
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 DocumentChunk
impl Debug for DocumentChunk
Source§impl<'de> Deserialize<'de> for DocumentChunk
impl<'de> Deserialize<'de> for DocumentChunk
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 DocumentChunk
impl RefUnwindSafe for DocumentChunk
impl Send for DocumentChunk
impl Sync for DocumentChunk
impl Unpin for DocumentChunk
impl UnwindSafe for DocumentChunk
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