pub struct Fact {
pub id: Ulid,
pub scope: Scope,
pub subject: Ulid,
pub predicate: String,
pub object: Ulid,
pub fact_text: String,
pub embedding: Option<Vec<f32>>,
pub bt: BiTemporal,
pub confidence: f32,
pub provenance: Vec<Ulid>,
pub activation: f32,
}Fields§
§id: Ulid§scope: ScopeRFC 0001 — partition key for multi-agent / multi-tenant isolation.
subject: Ulid§predicate: String§object: Ulid§fact_text: String§embedding: Option<Vec<f32>>See the W3 skip_serializing rationale on Chunk::embedding.
bt: BiTemporal§confidence: f32§provenance: Vec<Ulid>§activation: f32Implementations§
Source§impl Fact
impl Fact
Sourcepub fn new(
scope: Scope,
subject: Ulid,
predicate: impl Into<String>,
object: Ulid,
fact_text: impl Into<String>,
confidence: f32,
clock: &HlcClock,
) -> Fact
pub fn new( scope: Scope, subject: Ulid, predicate: impl Into<String>, object: Ulid, fact_text: impl Into<String>, confidence: f32, clock: &HlcClock, ) -> Fact
Construct a new Fact.
scope is the partition key (RFC 0001). Corresponds to “Claim” in the
RFC §3.2 primitive list (the codebase uses Fact as the canonical name).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fact
impl<'de> Deserialize<'de> for Fact
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Fact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Fact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Fact
impl Serialize for Fact
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 UnsafeUnpin 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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