pub struct TrackingHashContext { /* private fields */ }Expand description
Runtime tracking-hash state. Secret bytes are intentionally excluded from serialization and debug output.
Implementations§
Source§impl TrackingHashContext
impl TrackingHashContext
Sourcepub fn from_config(config: &KvRouterConfig) -> Result<Self>
pub fn from_config(config: &KvRouterConfig) -> Result<Self>
Load and validate the runtime context from router configuration.
pub fn algorithm(&self) -> TrackingHashAlgorithm
Sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
Return the provider-managed key epoch without exposing secret material.
Sourcepub fn compute_sequence_hashes_for_tracking(
&self,
scope: TrackingHashScope<'_>,
tokens: &[u32],
options: BlockHashOptions<'_>,
assume_kv_reuse: bool,
precomputed_public_block_hashes: Option<&[LocalBlockHash]>,
) -> Vec<SequenceHash> ⓘ
pub fn compute_sequence_hashes_for_tracking( &self, scope: TrackingHashScope<'_>, tokens: &[u32], options: BlockHashOptions<'_>, assume_kv_reuse: bool, precomputed_public_block_hashes: Option<&[LocalBlockHash]>, ) -> Vec<SequenceHash> ⓘ
Compute active-tracking identities using the configured reuse policy.
Callers that start from raw tokens should use this method rather than choosing between keyed/public and random identities themselves.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrackingHashContext
impl RefUnwindSafe for TrackingHashContext
impl Send for TrackingHashContext
impl Sync for TrackingHashContext
impl Unpin for TrackingHashContext
impl UnsafeUnpin for TrackingHashContext
impl UnwindSafe for TrackingHashContext
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