pub struct Document {
pub content: String,
pub metadata: HashMap<String, Value>,
pub score: Option<f64>,
}Expand description
A retrieved document fragment with optional metadata and relevance score.
Fields§
§content: StringThe text content of the document.
metadata: HashMap<String, Value>Arbitrary key-value metadata (e.g., source URL, page number, title).
score: Option<f64>Relevance score assigned by the retrieval backend (higher = more relevant).
None if the backend does not provide scores.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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