Skip to main content

QueryIdentity

Trait QueryIdentity 

Source
pub trait QueryIdentity {
    // Required methods
    fn queue_key_package_rotation(&self) -> Result<(), StorageError>;
    fn queue_key_rotation_with_nudge(
        &self,
        rotation_task_hash: &TaskDataHash,
        rotation_seed: NewTask,
    ) -> Result<(), StorageError>;
    fn reset_key_package_rotation_queue(
        &self,
        rotation_interval_ns: i64,
    ) -> Result<(), StorageError>;
    fn is_identity_needs_rotation(&self) -> Result<bool, StorageError>;
    fn next_key_package_rotation_ns(&self) -> Result<Option<i64>, StorageError>;
}

Required Methods§

Source

fn queue_key_package_rotation(&self) -> Result<(), StorageError>

Source

fn queue_key_rotation_with_nudge( &self, rotation_task_hash: &TaskDataHash, rotation_seed: NewTask, ) -> Result<(), StorageError>

Atomically lower/initialize the rotation column (5s debounce) AND enqueue a PullInDeadline task targeting rotation_task_hash at the resulting column value — one transaction, so neither write can land without the other. rotation_seed is insert-or-ignored first so the pull-in always has a live target (commit-target-first), even if startup seeding never ran. Callers wake the TaskWorker AFTER this returns (never inside a tx).

Source

fn reset_key_package_rotation_queue( &self, rotation_interval_ns: i64, ) -> Result<(), StorageError>

Source

fn is_identity_needs_rotation(&self) -> Result<bool, StorageError>

Source

fn next_key_package_rotation_ns(&self) -> Result<Option<i64>, StorageError>

The identity’s absolute rotation deadline (next_key_package_rotation_ns). None if NULL or if no identity row exists yet (indistinguishable to callers; treat as “no scheduled deadline”).

Implementations on Foreign Types§

Source§

impl<T> QueryIdentity for &T
where T: QueryIdentity,

Implementors§