pub struct RotatingFile<S: SuffixScheme> { /* private fields */ }Expand description
A rotating log file. This will create log files that are limited in size,
before being moved to name.X and optionally compressed.
Implementations§
Source§impl<S: SuffixScheme> RotatingFile<S>
impl<S: SuffixScheme> RotatingFile<S>
Sourcepub fn new<P>(
path: P,
suffix_scheme: S,
content_limit: ContentLimit,
compression: Compression,
) -> Self
pub fn new<P>( path: P, suffix_scheme: S, content_limit: ContentLimit, compression: Compression, ) -> Self
Create a new rotating file writer
Trait Implementations§
Source§impl<S: SuffixScheme> Write for RotatingFile<S>
impl<S: SuffixScheme> Write for RotatingFile<S>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<S> Freeze for RotatingFile<S>where
S: Freeze,
impl<S> RefUnwindSafe for RotatingFile<S>
impl<S> Send for RotatingFile<S>
impl<S> Sync for RotatingFile<S>
impl<S> Unpin for RotatingFile<S>where
S: Unpin,
impl<S> UnwindSafe for RotatingFile<S>
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