pub struct ProposedFact {
pub key: ContextKey,
pub id: String,
pub content: String,
pub confidence: f64,
pub provenance: String,
}Expand description
A suggested fact from a non-authoritative source (e.g., LLM).
ProposedFact is compile-time separated from Fact to enforce
that LLM outputs cannot accidentally become trusted facts.
Promotion requires explicit validation via TryFrom.
§Decision Reference
See DECISIONS.md §3: “If something is dangerous, make it impossible to misuse.”
Fields§
§key: ContextKeyThe category this proposed fact would belong to.
id: StringSuggested identifier.
content: StringThe proposed content.
confidence: f64Confidence hint from the source (0.0 - 1.0).
provenance: StringProvenance information (e.g., model ID, prompt hash).
Trait Implementations§
Source§impl Clone for ProposedFact
impl Clone for ProposedFact
Source§fn clone(&self) -> ProposedFact
fn clone(&self) -> ProposedFact
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 ProposedFact
impl Debug for ProposedFact
Source§impl<'de> Deserialize<'de> for ProposedFact
impl<'de> Deserialize<'de> for ProposedFact
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
Source§impl PartialEq for ProposedFact
impl PartialEq for ProposedFact
Source§impl Serialize for ProposedFact
impl Serialize for ProposedFact
Source§impl TryFrom<ProposedFact> for Fact
impl TryFrom<ProposedFact> for Fact
Source§fn try_from(proposed: ProposedFact) -> Result<Self, Self::Error>
fn try_from(proposed: ProposedFact) -> Result<Self, Self::Error>
Converts a ProposedFact to a Fact after validation.
This is the ONLY way to promote a proposal to a fact. In production, this would include schema validation, constraint checks, and governance rules.
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
impl StructuralPartialEq for ProposedFact
Auto Trait Implementations§
impl Freeze for ProposedFact
impl RefUnwindSafe for ProposedFact
impl Send for ProposedFact
impl Sync for ProposedFact
impl Unpin for ProposedFact
impl UnwindSafe for ProposedFact
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