pub struct FileRotation { /* private fields */ }
Implementations§
Source§impl FileRotation
See module documentation.
impl FileRotation
See module documentation.
pub fn new(file: impl AsRef<Path>) -> Self
Sourcepub fn max_old_files(self, max_old_files: usize) -> Self
pub fn max_old_files(self, max_old_files: usize) -> Self
Set a maximum of how many files to keep.
Sourcepub fn file_extension(self, extension: impl ToString) -> Self
pub fn file_extension(self, extension: impl ToString) -> Self
Set a file extension to use if none is present in the original filename
pub fn rotate(self) -> Result<()>
Auto Trait Implementations§
impl Freeze for FileRotation
impl RefUnwindSafe for FileRotation
impl Send for FileRotation
impl Sync for FileRotation
impl Unpin 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