pub struct Relation {
pub id: RelationId,
pub src_id: EntityId,
pub dst_id: EntityId,
pub predicate: String,
pub attrs: Value,
pub valid_from: Option<DateTime<Utc>>,
pub valid_to: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}Expand description
An edge in the knowledge graph.
Fields§
§id: RelationIdStable id.
src_id: EntityIdSource entity.
dst_id: EntityIdDestination entity.
predicate: StringFree-form predicate ("works_on", "depends_on", "ports_patterns_from").
attrs: ValueArbitrary structured attributes serialised as JSON.
valid_from: Option<DateTime<Utc>>Lower bound of validity.
valid_to: Option<DateTime<Utc>>Upper bound of validity.
created_at: DateTime<Utc>Wall-clock creation time.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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