pub enum RotationPolicy {
Size(u64),
Time(Duration),
SizeOrTime(u64, Duration),
}Expand description
日志轮转策略
Variants§
Size(u64)
按字节大小轮转:当前日志达到 max_bytes 时轮转
Time(Duration)
按时间轮转:当前日志存活超过 max_age 时轮转
SizeOrTime(u64, Duration)
大小或时间任一条件满足即轮转
Trait Implementations§
Source§impl Clone for RotationPolicy
impl Clone for RotationPolicy
Source§fn clone(&self) -> RotationPolicy
fn clone(&self) -> RotationPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RotationPolicy
impl RefUnwindSafe for RotationPolicy
impl Send for RotationPolicy
impl Sync for RotationPolicy
impl Unpin for RotationPolicy
impl UnsafeUnpin for RotationPolicy
impl UnwindSafe for RotationPolicy
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