Enum spdlog::sink::RotationPolicy
source · [−]Expand description
Rotation policies for RotatingFileSink
.
Panics
Note that some parameters have range requirements, functions that receive it will panic if the requirements are not met.
Variants
FileSize(u64)
Tuple Fields
0: u64
Max file size (in bytes). Range: (0, u64::MAX].
Rotates when the log file reaches the given max file size.
Daily
Fields
hour: u32
Hour of the time point. Range: [0, 23].
minute: u32
Minute of the time point. Range: [0, 59].
Rotates daily at the given time point.
Hourly
Rotates hourly.
Trait Implementations
sourceimpl Clone for RotationPolicy
impl Clone for RotationPolicy
sourcefn clone(&self) -> RotationPolicy
fn clone(&self) -> RotationPolicy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RotationPolicy
impl Debug for RotationPolicy
sourceimpl Hash for RotationPolicy
impl Hash for RotationPolicy
sourceimpl PartialEq<RotationPolicy> for RotationPolicy
impl PartialEq<RotationPolicy> for RotationPolicy
sourcefn eq(&self, other: &RotationPolicy) -> bool
fn eq(&self, other: &RotationPolicy) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RotationPolicy) -> bool
fn ne(&self, other: &RotationPolicy) -> bool
This method tests for !=
.
impl Copy for RotationPolicy
impl Eq for RotationPolicy
impl StructuralEq for RotationPolicy
impl StructuralPartialEq for RotationPolicy
Auto Trait Implementations
impl RefUnwindSafe for RotationPolicy
impl Send for RotationPolicy
impl Sync for RotationPolicy
impl Unpin for RotationPolicy
impl UnwindSafe for RotationPolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more