pub struct RotatingFileBuilder { /* private fields */ }Available on crate feature
std only.Expand description
Options for a RotatingFile. Create with RotatingFile::builder.
Implementations§
Source§impl RotatingFileBuilder
impl RotatingFileBuilder
Sourcepub const fn max_bytes(self, bytes: u64) -> Self
pub const fn max_bytes(self, bytes: u64) -> Self
Rotate before a write would take the active file past bytes.
Sourcepub const fn max_files(self, count: usize) -> Self
pub const fn max_files(self, count: usize) -> Self
How many rotated files to keep (<path>.1 ..= <path>.N).
0 keeps none.
Sourcepub const fn buffer_capacity(self, bytes: usize) -> Self
pub const fn buffer_capacity(self, bytes: usize) -> Self
Size of the in-memory write buffer (0 = unbuffered).
Sourcepub fn open(self) -> Result<RotatingFile>
pub fn open(self) -> Result<RotatingFile>
Open (or create) the active file in append mode.
If the file already exists and was last modified in an earlier period of the time schedule, it is rotated on the first write.
§Errors
Returns the I/O error from opening the file.
Trait Implementations§
Source§impl Clone for RotatingFileBuilder
impl Clone for RotatingFileBuilder
Auto Trait Implementations§
impl Freeze for RotatingFileBuilder
impl RefUnwindSafe for RotatingFileBuilder
impl Send for RotatingFileBuilder
impl Sync for RotatingFileBuilder
impl Unpin for RotatingFileBuilder
impl UnsafeUnpin for RotatingFileBuilder
impl UnwindSafe for RotatingFileBuilder
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