pub struct AskAnswer {
pub answer: Option<String>,
pub citations: Option<Vec<Citation>>,
pub degraded: Option<bool>,
pub question: Option<String>,
}Fields§
§answer: Option<String>Answer is the synthesized prose. EMPTY is a real answer here: nothing in the index matched, or synthesis was unavailable — read degraded and citations to tell those apart. It is never written without grounding.
citations: Option<Vec<Citation>>Citations are the exact regions the answer was grounded on, and they are the point: an answer is checkable only because every claim in it can be read back at a file and line. Present even when Answer is empty.
degraded: Option<bool>Degraded is true when retrieval worked but no synthesizer was reachable. The citations are still real code, so a caller can answer from them itself; a caller that treats this like an error throws away a usable result.
question: Option<String>Question is the ask, echoed back.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AskAnswer
impl<'de> Deserialize<'de> for AskAnswer
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
impl StructuralPartialEq for AskAnswer
Auto Trait Implementations§
impl Freeze for AskAnswer
impl RefUnwindSafe for AskAnswer
impl Send for AskAnswer
impl Sync for AskAnswer
impl Unpin for AskAnswer
impl UnsafeUnpin for AskAnswer
impl UnwindSafe for AskAnswer
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