pub struct EvolutionRelation {
pub id: String,
pub source_id: String,
pub target_id: String,
pub evolution_type: EvolutionType,
pub reason: String,
pub confidence: f32,
pub created_at: DateTime<Utc>,
}Expand description
A relationship between two memories showing how one evolved from another.
The relation is directional: source is the older memory, target is the newer.
Fields§
§id: StringUnique identifier (UUID v4)
source_id: StringID of the older/source memory
target_id: StringID of the newer/target memory
evolution_type: EvolutionTypeType of evolution relationship
reason: StringHuman-readable reason for the relationship
confidence: f32Confidence score (0.0 to 1.0)
created_at: DateTime<Utc>When this relation was detected
Implementations§
Source§impl EvolutionRelation
impl EvolutionRelation
Sourcepub fn new(
source_id: String,
target_id: String,
evolution_type: EvolutionType,
reason: String,
confidence: f32,
) -> Self
pub fn new( source_id: String, target_id: String, evolution_type: EvolutionType, reason: String, confidence: f32, ) -> Self
Create a new evolution relation.
§Panics
Panics if reason exceeds limit or confidence is out of range.
Sourcepub fn builder(
source_id: String,
target_id: String,
evolution_type: EvolutionType,
) -> EvolutionRelationBuilder
pub fn builder( source_id: String, target_id: String, evolution_type: EvolutionType, ) -> EvolutionRelationBuilder
Create a builder for more complex construction.
Sourcepub fn is_high_confidence(&self) -> bool
pub fn is_high_confidence(&self) -> bool
Is this a high-confidence relation?
Sourcepub fn needs_resolution(&self) -> bool
pub fn needs_resolution(&self) -> bool
Is this a conflict that needs resolution?
Trait Implementations§
Source§impl Clone for EvolutionRelation
impl Clone for EvolutionRelation
Source§fn clone(&self) -> EvolutionRelation
fn clone(&self) -> EvolutionRelation
Returns a duplicate of the value. Read more
1.0.0 · 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 EvolutionRelation
impl Debug for EvolutionRelation
Source§impl<'de> Deserialize<'de> for EvolutionRelation
impl<'de> Deserialize<'de> for EvolutionRelation
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
Auto Trait Implementations§
impl Freeze for EvolutionRelation
impl RefUnwindSafe for EvolutionRelation
impl Send for EvolutionRelation
impl Sync for EvolutionRelation
impl Unpin for EvolutionRelation
impl UnwindSafe for EvolutionRelation
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