pub struct RetentionPolicyManager { /* private fields */ }Expand description
Data retention policy manager for GDPR and compliance
Implementations§
Source§impl RetentionPolicyManager
impl RetentionPolicyManager
Sourcepub fn add_policy(&mut self, policy: RetentionPolicy) -> Result<()>
pub fn add_policy(&mut self, policy: RetentionPolicy) -> Result<()>
Add a retention policy
Sourcepub fn get_policy(&self, name: &str) -> Result<&RetentionPolicy>
pub fn get_policy(&self, name: &str) -> Result<&RetentionPolicy>
Get a retention policy by name
Sourcepub fn set_default_policy(&mut self, name: &str) -> Result<()>
pub fn set_default_policy(&mut self, name: &str) -> Result<()>
Set the default retention policy
Sourcepub fn classify_event(&self, event: &Event) -> Result<EventDataClassification>
pub fn classify_event(&self, event: &Event) -> Result<EventDataClassification>
Classify event data for retention
Sourcepub async fn enforce_retention(
&self,
events: Vec<Event>,
classifications: HashMap<String, EventDataClassification>,
legal_holds: &[LegalHold],
) -> Result<RetentionEnforcementResult>
pub async fn enforce_retention( &self, events: Vec<Event>, classifications: HashMap<String, EventDataClassification>, legal_holds: &[LegalHold], ) -> Result<RetentionEnforcementResult>
Enforce retention policies on events
Sourcepub fn list_policies(&self) -> Vec<String>
pub fn list_policies(&self) -> Vec<String>
List all retention policies
Sourcepub fn get_retention_stats(&self) -> HashMap<String, usize>
pub fn get_retention_stats(&self) -> HashMap<String, usize>
Get retention statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetentionPolicyManager
impl RefUnwindSafe for RetentionPolicyManager
impl Send for RetentionPolicyManager
impl Sync for RetentionPolicyManager
impl Unpin for RetentionPolicyManager
impl UnwindSafe for RetentionPolicyManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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