pub struct ThoughtRelation {
pub kind: ThoughtRelationKind,
pub target_id: Uuid,
}Expand description
Typed edge in the thought graph.
A relation explains why one thought points to another thought. This avoids a common misconception: not every link is just a generic “reference”. A later thought may correct, summarize, support, or continue an earlier one, and that semantic meaning matters during replay, inspection, and retrieval.
ThoughtRelation is more expressive than raw refs. Use refs when a
simple positional backlink is enough. Use relations when the meaning of the
link should survive into downstream tools, summaries, and audits.
§Example
use mentisdb::{ThoughtRelation, ThoughtRelationKind};
use uuid::Uuid;
let relation = ThoughtRelation {
kind: ThoughtRelationKind::Supports,
target_id: Uuid::nil(),
};
assert_eq!(relation.kind, ThoughtRelationKind::Supports);Fields§
§kind: ThoughtRelationKindSemantic meaning of the edge.
target_id: UuidStable id of the target thought.
Trait Implementations§
Source§impl Clone for ThoughtRelation
impl Clone for ThoughtRelation
Source§fn clone(&self) -> ThoughtRelation
fn clone(&self) -> ThoughtRelation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThoughtRelation
impl Debug for ThoughtRelation
Source§impl<'de> Deserialize<'de> for ThoughtRelation
impl<'de> Deserialize<'de> for ThoughtRelation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThoughtRelation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThoughtRelation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ThoughtRelation
Source§impl PartialEq for ThoughtRelation
impl PartialEq for ThoughtRelation
Source§fn eq(&self, other: &ThoughtRelation) -> bool
fn eq(&self, other: &ThoughtRelation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ThoughtRelation
impl Serialize for ThoughtRelation
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 ThoughtRelation
Auto Trait Implementations§
impl Freeze for ThoughtRelation
impl RefUnwindSafe for ThoughtRelation
impl Send for ThoughtRelation
impl Sync for ThoughtRelation
impl Unpin for ThoughtRelation
impl UnsafeUnpin for ThoughtRelation
impl UnwindSafe for ThoughtRelation
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.