pub struct IdentityContinuityTracker { /* private fields */ }Expand description
Identity continuity tracker
Implementations§
Source§impl IdentityContinuityTracker
impl IdentityContinuityTracker
Sourcepub fn track_continuity(
&mut self,
timestamp: TscTimestamp,
state: &[u8],
) -> TemporalResult<()>
pub fn track_continuity( &mut self, timestamp: TscTimestamp, state: &[u8], ) -> TemporalResult<()>
Track identity continuity at a specific timestamp
Sourcepub fn validate_continuity(&self) -> TemporalResult<()>
pub fn validate_continuity(&self) -> TemporalResult<()>
Validate current identity continuity.
Returns Ok with too little history to judge (fewer than 2 snapshots) —
otherwise the very first scheduler tick that runs an
IdentityPreservation { continuity_check: true } task would fail
because continuity_score is still at its 0.0 initial value,
below any sensible threshold.
Sourcepub fn get_metrics(&self) -> TemporalResult<ContinuityMetrics>
pub fn get_metrics(&self) -> TemporalResult<ContinuityMetrics>
Get current continuity metrics
Sourcepub fn get_identity_stability(&self) -> f64
pub fn get_identity_stability(&self) -> f64
Get identity stability score
Sourcepub fn get_continuity_score(&self) -> f64
pub fn get_continuity_score(&self) -> f64
Get continuity score
Sourcepub fn set_continuity_threshold(&mut self, threshold: f64)
pub fn set_continuity_threshold(&mut self, threshold: f64)
Set continuity threshold
Sourcepub fn get_identity_trajectory(&self, window_size: usize) -> Vec<f64>
pub fn get_identity_trajectory(&self, window_size: usize) -> Vec<f64>
Get recent identity trajectory
Sourcepub fn calculate_identity_drift(&self) -> f64
pub fn calculate_identity_drift(&self) -> f64
Calculate identity drift over time
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdentityContinuityTracker
impl RefUnwindSafe for IdentityContinuityTracker
impl Send for IdentityContinuityTracker
impl Sync for IdentityContinuityTracker
impl Unpin for IdentityContinuityTracker
impl UnsafeUnpin for IdentityContinuityTracker
impl UnwindSafe for IdentityContinuityTracker
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