[][src]Enum file_rotator::RotationPeriod

#[non_exhaustive]pub enum RotationPeriod {
    Lines(usize),
    Bytes(usize),
    Interval(Duration),
    Manual,
}

A specifier for how often we should rotate files

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Lines(usize)

Rotate every N line terminato bytes (0x0a, b'\n')

Bytes(usize)

Rotate every N bytes successfully written

This does not count bytes that are not written to the underlying file (when the given buffer's len does not match with the return value of io::Write::write)

Interval(Duration)

Rotate every time N amount of time passes

This is calculated on every write and is based on comparing two Instant::now return values

Manual

Rotate only via RotatingFile::rotate

Trait Implementations

impl Clone for RotationPeriod[src]

impl Copy for RotationPeriod[src]

impl Debug for RotationPeriod[src]

impl Eq for RotationPeriod[src]

impl Ord for RotationPeriod[src]

impl PartialEq<RotationPeriod> for RotationPeriod[src]

impl PartialOrd<RotationPeriod> for RotationPeriod[src]

impl StructuralEq for RotationPeriod[src]

impl StructuralPartialEq for RotationPeriod[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.