pub struct Fact {
pub key: ContextKey,
pub id: String,
pub content: String,
}Expand description
A typed assertion added to context.
Facts are immutable once created. They carry provenance for auditability.
Fields§
§key: ContextKeyThe category this fact belongs to.
id: StringUnique identifier within the context.
content: StringThe fact’s content (simplified for MVP).
Trait Implementations§
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 Eq for Fact
impl StructuralPartialEq for Fact
Auto Trait Implementations§
impl Freeze for Fact
impl RefUnwindSafe for Fact
impl Send for Fact
impl Sync for Fact
impl Unpin for Fact
impl UnwindSafe for Fact
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