pub struct RotationConfig {
pub policy: RotationPolicy,
pub max_files: usize,
pub compress: bool,
}Expand description
Configuration for log rotation.
Fields§
§policy: RotationPolicyRotation policy
max_files: usizeMaximum number of rotated files to keep
compress: boolWhether to compress rotated files
Implementations§
Source§impl RotationConfig
impl RotationConfig
Sourcepub fn new(policy: RotationPolicy) -> Self
pub fn new(policy: RotationPolicy) -> Self
Create a new rotation config.
Sourcepub fn with_max_files(self, max: usize) -> Self
pub fn with_max_files(self, max: usize) -> Self
Set maximum files to keep.
Sourcepub fn with_compression(self, compress: bool) -> Self
pub fn with_compression(self, compress: bool) -> Self
Enable compression.
Trait Implementations§
Source§impl Clone for RotationConfig
impl Clone for RotationConfig
Source§fn clone(&self) -> RotationConfig
fn clone(&self) -> RotationConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RotationConfig
impl Debug for RotationConfig
Auto Trait Implementations§
impl Freeze for RotationConfig
impl RefUnwindSafe for RotationConfig
impl Send for RotationConfig
impl Sync for RotationConfig
impl Unpin for RotationConfig
impl UnsafeUnpin for RotationConfig
impl UnwindSafe for RotationConfig
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