Struct log4rs::append::rolling_file::policy::compound::roll::fixed_window::FixedWindowRollerBuilder
source · pub struct FixedWindowRollerBuilder { /* private fields */ }
Expand description
A builder for the FixedWindowRoller
.
Implementations§
source§impl FixedWindowRollerBuilder
impl FixedWindowRollerBuilder
sourcepub fn base(self, base: u32) -> FixedWindowRollerBuilder
pub fn base(self, base: u32) -> FixedWindowRollerBuilder
Sets the base index for archived log files.
Defaults to 0.
sourcepub fn build(self, pattern: &str, count: u32) -> Result<FixedWindowRoller>
pub fn build(self, pattern: &str, count: u32) -> Result<FixedWindowRoller>
Constructs a new FixedWindowRoller
.
pattern
is either an absolute path or lacking a leading /
, relative
to the cwd
of your application. The pattern must contain at least one
instance of {}
, all of which will be replaced with an archived log file’s index.
If the file extension of the pattern is .gz
and the gzip
Cargo
feature is enabled, the archive files will be gzip-compressed.
If the extension is .gz
and the gzip
feature is not enabled, an error will be returned.
count
is the maximum number of archived logs to maintain.
Trait Implementations§
source§impl Clone for FixedWindowRollerBuilder
impl Clone for FixedWindowRollerBuilder
source§fn clone(&self) -> FixedWindowRollerBuilder
fn clone(&self) -> FixedWindowRollerBuilder
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 FixedWindowRollerBuilder
impl Debug for FixedWindowRollerBuilder
source§impl Default for FixedWindowRollerBuilder
impl Default for FixedWindowRollerBuilder
source§fn default() -> FixedWindowRollerBuilder
fn default() -> FixedWindowRollerBuilder
Returns the “default value” for a type. Read more
source§impl Hash for FixedWindowRollerBuilder
impl Hash for FixedWindowRollerBuilder
source§impl PartialEq for FixedWindowRollerBuilder
impl PartialEq for FixedWindowRollerBuilder
source§fn eq(&self, other: &FixedWindowRollerBuilder) -> bool
fn eq(&self, other: &FixedWindowRollerBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FixedWindowRollerBuilder
impl Eq for FixedWindowRollerBuilder
impl StructuralPartialEq for FixedWindowRollerBuilder
Auto Trait Implementations§
impl RefUnwindSafe for FixedWindowRollerBuilder
impl Send for FixedWindowRollerBuilder
impl Sync for FixedWindowRollerBuilder
impl Unpin for FixedWindowRollerBuilder
impl UnwindSafe for FixedWindowRollerBuilder
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.