pub struct QuestionContract {
pub question: String,
pub answer_shape: String,
pub seed_intent: String,
pub sparql: String,
pub expected: String,
pub self_test: bool,
}Fields§
§question: String§answer_shape: String§seed_intent: String§sparql: String§expected: String§self_test: boolSet only on the built-in self-test contract. An explicit flag, not the marker: a user’s own question may legitimately use the same marker (CI’s fixture does), and must never be answered from Tambo’s scratch store.
Implementations§
Source§impl QuestionContract
impl QuestionContract
Sourcepub fn self_test() -> Self
pub fn self_test() -> Self
The question offered when a first-time user presses enter at the
question-count prompt. It proves the store answers a real query; it
says nothing about the user’s own domain, and verify-questions always
runs it against its own seeded scratch store.
Sourcepub fn is_self_test(&self) -> bool
pub fn is_self_test(&self) -> bool
The explicit flag, or (for plans written before the flag existed) an exact match on every field of the self-test contract. Never the marker alone: that made a user question sharing the marker pass vacuously against the seeded scratch store (caught by CI’s negative control).
Trait Implementations§
Source§impl Clone for QuestionContract
impl Clone for QuestionContract
Source§impl Debug for QuestionContract
impl Debug for QuestionContract
Source§impl<'de> Deserialize<'de> for QuestionContract
impl<'de> Deserialize<'de> for QuestionContract
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 Eq for QuestionContract
Source§impl PartialEq for QuestionContract
impl PartialEq for QuestionContract
Source§impl Serialize for QuestionContract
impl Serialize for QuestionContract
impl StructuralPartialEq for QuestionContract
Auto Trait Implementations§
impl Forget for QuestionContract
impl Freeze for QuestionContract
impl Move for QuestionContract
impl RefUnwindSafe for QuestionContract
impl Send for QuestionContract
impl Sync for QuestionContract
impl Unpin for QuestionContract
impl UnsafeUnpin for QuestionContract
impl UnwindSafe for QuestionContract
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.