pub struct Entity {
pub id: EntityId,
pub name: String,
pub entity_type: String,
pub attrs: Value,
pub valid_from: Option<DateTime<Utc>>,
pub valid_to: Option<DateTime<Utc>>,
pub source_doc_id: Option<String>,
pub confidence: f32,
pub created_at: DateTime<Utc>,
}Expand description
A node in the knowledge graph.
Fields§
§id: EntityIdStable id (UUID v4 by default).
name: StringHuman-readable name ("Damien", "Aonyx Agent", "GPT-5").
entity_type: StringFree-form type tag ("person", "project", "model").
attrs: ValueArbitrary structured attributes serialised as JSON.
valid_from: Option<DateTime<Utc>>Lower bound of validity (inclusive). None = “since forever”.
valid_to: Option<DateTime<Utc>>Upper bound of validity (exclusive). None = “still true”.
source_doc_id: Option<String>Optional pointer to the document this entity was extracted from.
confidence: f32Confidence in the assertion (0.0–1.0).
created_at: DateTime<Utc>Wall-clock creation time.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entity
impl<'de> Deserialize<'de> for Entity
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 StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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