Struct rolling_file::RollingConditionBasic
source · pub struct RollingConditionBasic { /* private fields */ }
Expand description
Implements a rolling condition based on a certain frequency and/or a size limit. The default condition is to rotate daily.
Examples
use rolling_file::*;
let c = RollingConditionBasic::new().daily();
let c = RollingConditionBasic::new().hourly().max_size(1024 * 1024);
Implementations§
source§impl RollingConditionBasic
impl RollingConditionBasic
sourcepub fn new() -> RollingConditionBasic
pub fn new() -> RollingConditionBasic
Constructs a new struct that does not yet have any condition set.
sourcepub fn frequency(self, x: RollingFrequency) -> RollingConditionBasic
pub fn frequency(self, x: RollingFrequency) -> RollingConditionBasic
Sets a condition to rollover on the given frequency
sourcepub fn daily(self) -> RollingConditionBasic
pub fn daily(self) -> RollingConditionBasic
Sets a condition to rollover when the date changes
sourcepub fn hourly(self) -> RollingConditionBasic
pub fn hourly(self) -> RollingConditionBasic
Sets a condition to rollover when the date or hour changes
sourcepub fn max_size(self, x: u64) -> RollingConditionBasic
pub fn max_size(self, x: u64) -> RollingConditionBasic
Sets a condition to rollover when a certain size is reached
Trait Implementations§
source§impl Clone for RollingConditionBasic
impl Clone for RollingConditionBasic
source§fn clone(&self) -> RollingConditionBasic
fn clone(&self) -> RollingConditionBasic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RollingConditionBasic
impl Debug for RollingConditionBasic
source§impl Default for RollingConditionBasic
impl Default for RollingConditionBasic
source§impl PartialEq<RollingConditionBasic> for RollingConditionBasic
impl PartialEq<RollingConditionBasic> for RollingConditionBasic
source§fn eq(&self, other: &RollingConditionBasic) -> bool
fn eq(&self, other: &RollingConditionBasic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.