Skip to main content

IdentityContinuityTracker

Struct IdentityContinuityTracker 

Source
pub struct IdentityContinuityTracker { /* private fields */ }
Expand description

Identity continuity tracker

Implementations§

Source§

impl IdentityContinuityTracker

Source

pub fn new() -> Self

Create a new identity continuity tracker

Source

pub fn track_continuity( &mut self, timestamp: TscTimestamp, state: &[u8], ) -> TemporalResult<()>

Track identity continuity at a specific timestamp

Source

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.

Source

pub fn get_metrics(&self) -> TemporalResult<ContinuityMetrics>

Get current continuity metrics

Source

pub fn get_identity_stability(&self) -> f64

Get identity stability score

Source

pub fn get_continuity_score(&self) -> f64

Get continuity score

Source

pub fn reset(&mut self)

Reset tracking state

Source

pub fn set_continuity_threshold(&mut self, threshold: f64)

Set continuity threshold

Source

pub fn get_identity_trajectory(&self, window_size: usize) -> Vec<f64>

Get recent identity trajectory

Source

pub fn calculate_identity_drift(&self) -> f64

Calculate identity drift over time

Trait Implementations§

Source§

impl Default for IdentityContinuityTracker

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V