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 PartialEq for ProposedFact
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more