[][src]Struct file_rotator::RotatingFile

pub struct RotatingFile { /* fields omitted */ }

As per the name, a rotating file

Handles being a fake file which will automagicaly rotate as bytes are written into it

Implementations

impl RotatingFile[src]

pub fn new<Name, Directory>(
    name: Name,
    directory: Directory,
    rotate_every: RotationPeriod,
    max_files: NonZeroUsize
) -> Self where
    Name: Into<Cow<'static, str>>,
    Directory: Into<PathBuf>, 
[src]

Create a new rotating file with the given base name, in the given directory, rotating every given period and with a max of a given number of files

pub fn rotate(&mut self) -> Result<()>[src]

Manually rotate the file out

This is the only way that a file whose rotation_period is RotationPeriod::Manual can rotate.

Trait Implementations

impl Debug for RotatingFile[src]

impl Write for RotatingFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.