pub struct AnonymizationEngine { /* private fields */ }Expand description
Session-scoped anonymization engine.
Holds all cryptographic state and caches for a single anonymization run. Create one engine per dataset export; reusing the same engine ensures consistent mappings across all flows.
Implementations§
Source§impl AnonymizationEngine
impl AnonymizationEngine
Sourcepub fn new(policy: AnonymizationPolicy) -> Self
pub fn new(policy: AnonymizationPolicy) -> Self
Create a new engine from the given policy.
Any unspecified keys/salts in the policy are generated randomly.
Sourcepub fn anonymize_conversations(
&mut self,
conversations: &mut [ConversationState],
)
pub fn anonymize_conversations( &mut self, conversations: &mut [ConversationState], )
Anonymize a batch of conversations in place.
Sourcepub fn anonymize_conversation(&mut self, conv: &mut ConversationState)
pub fn anonymize_conversation(&mut self, conv: &mut ConversationState)
Anonymize a single conversation in place.
Sourcepub fn policy(&self) -> &AnonymizationPolicy
pub fn policy(&self) -> &AnonymizationPolicy
The underlying policy.
Sourcepub fn hasher(&self) -> &SaltedHasher
pub fn hasher(&self) -> &SaltedHasher
The salted hasher (for packet-level anonymization of MACs, etc.).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnonymizationEngine
impl RefUnwindSafe for AnonymizationEngine
impl Send for AnonymizationEngine
impl Sync for AnonymizationEngine
impl Unpin for AnonymizationEngine
impl UnsafeUnpin for AnonymizationEngine
impl UnwindSafe for AnonymizationEngine
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more