pub struct StructuredFact {
pub title: String,
pub url: String,
pub content: String,
pub attributes: Vec<(String, String)>,
pub is_structured_source: bool,
}Expand description
A structured fact extracted from an infobox or a direct answer. attributes
are the infobox key/value rows (e.g. ("religion", "Sunni Islam")).
Fields§
§title: String§url: String§content: String§attributes: Vec<(String, String)>§is_structured_source: boolAlways true — marks this as a pinned structured source so a later rerank-bypass (W1) can key off the flag, not the domain.
Implementations§
Source§impl StructuredFact
impl StructuredFact
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Compact markdown body for the answer-path source (title is carried
separately in the Source tuple).
Trait Implementations§
Source§impl Clone for StructuredFact
impl Clone for StructuredFact
Source§fn clone(&self) -> StructuredFact
fn clone(&self) -> StructuredFact
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructuredFact
impl Debug for StructuredFact
Source§impl PartialEq for StructuredFact
impl PartialEq for StructuredFact
Source§fn eq(&self, other: &StructuredFact) -> bool
fn eq(&self, other: &StructuredFact) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StructuredFact
Auto Trait Implementations§
impl Freeze for StructuredFact
impl RefUnwindSafe for StructuredFact
impl Send for StructuredFact
impl Sync for StructuredFact
impl Unpin for StructuredFact
impl UnsafeUnpin for StructuredFact
impl UnwindSafe for StructuredFact
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