pub struct Affinity {Show 16 fields
pub id: Uuid,
pub session_id: Uuid,
pub user_id: Uuid,
pub instance_id: Uuid,
pub warmth: f64,
pub trust: f64,
pub intrigue: f64,
pub intimacy: f64,
pub patience: f64,
pub tension: f64,
pub ghost_streak: i32,
pub last_ghost_at: Option<DateTime<Utc>>,
pub total_ghosts: i32,
pub relationship_label: Option<RelationshipLabel>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Fields§
§id: Uuid§session_id: Uuid§user_id: Uuid§instance_id: Uuid§warmth: f64§trust: f64§intrigue: f64§intimacy: f64§patience: f64§tension: f64§ghost_streak: i32§last_ghost_at: Option<DateTime<Utc>>§total_ghosts: i32§relationship_label: Option<RelationshipLabel>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl Affinity
impl Affinity
Sourcepub fn apply_deltas(&mut self, d: &AffinityDeltas, ema_inertia: f64)
pub fn apply_deltas(&mut self, d: &AffinityDeltas, ema_inertia: f64)
Apply LLM-evaluated deltas with EMA smoothing.
ema_inertia ∈ [0, 1] — 0 means full update; v1 default is 0.5 (gain 0.5).
pub fn apply_time_decay(&mut self)
pub fn infer_label(&self) -> Option<RelationshipLabel>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Affinity
impl<'de> Deserialize<'de> for Affinity
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 Affinity
Auto Trait Implementations§
impl Freeze for Affinity
impl RefUnwindSafe for Affinity
impl Send for Affinity
impl Sync for Affinity
impl Unpin for Affinity
impl UnsafeUnpin for Affinity
impl UnwindSafe for Affinity
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