pub struct FileRotation {
pub max_size: u64,
pub max_files: u32,
pub compress: bool,
}Expand description
File rotation configuration.
Fields§
§max_size: u64Maximum file size in bytes before rotation.
max_files: u32Maximum number of rotated files to keep.
compress: boolCompress rotated files (gzip).
Implementations§
Source§impl FileRotation
impl FileRotation
Sourcepub fn with_max_size_mb(mb: u64) -> Self
pub fn with_max_size_mb(mb: u64) -> Self
Create rotation config with size in megabytes.
Sourcepub fn compressed(self) -> Self
pub fn compressed(self) -> Self
Enable compression of rotated files.
Trait Implementations§
Source§impl Clone for FileRotation
impl Clone for FileRotation
Source§fn clone(&self) -> FileRotation
fn clone(&self) -> FileRotation
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 FileRotation
impl Debug for FileRotation
Source§impl Default for FileRotation
impl Default for FileRotation
Source§impl<'de> Deserialize<'de> for FileRotation
impl<'de> Deserialize<'de> for FileRotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileRotation
impl RefUnwindSafe for FileRotation
impl Send for FileRotation
impl Sync for FileRotation
impl Unpin for FileRotation
impl UnsafeUnpin for FileRotation
impl UnwindSafe for FileRotation
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