pub struct RotationPolicy {
pub max_entries: usize,
pub max_age_ms: i64,
}Expand description
Audit log rotation policy configuration.
max_entries: maximum number of log entries retained in memory; once exceeded, rotation is triggered automatically (old logs are cleared or flushed to disk)max_age_ms: maximum age of a log entry in milliseconds; once exceeded, rotation is triggered
Fields§
§max_entries: usizeMaximum entry count (0 means unlimited)
max_age_ms: i64Maximum age in milliseconds (0 means unlimited)
Implementations§
Source§impl RotationPolicy
impl RotationPolicy
Sourcepub fn by_size_and_age(max_entries: usize, max_age_ms: i64) -> Self
pub fn by_size_and_age(max_entries: usize, max_age_ms: i64) -> Self
Rotate by both entry count and age
Trait Implementations§
Source§impl Clone for RotationPolicy
impl Clone for RotationPolicy
Source§fn clone(&self) -> RotationPolicy
fn clone(&self) -> RotationPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RotationPolicy
impl Debug for RotationPolicy
Auto Trait Implementations§
impl Freeze for RotationPolicy
impl RefUnwindSafe for RotationPolicy
impl Send for RotationPolicy
impl Sync for RotationPolicy
impl Unpin for RotationPolicy
impl UnsafeUnpin for RotationPolicy
impl UnwindSafe for RotationPolicy
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