pub enum LogRotation {
Size(NonZeroU64),
Time(NonZeroU64),
Date,
Count(u32),
}
Expand description
Enum representing log rotation options.
Variants§
Size(NonZeroU64)
Size-based log rotation.
Time(NonZeroU64)
Time-based log rotation.
Date
Date-based log rotation.
Count(u32)
Count-based log rotation.
Trait Implementations§
Source§impl Clone for LogRotation
impl Clone for LogRotation
Source§fn clone(&self) -> LogRotation
fn clone(&self) -> LogRotation
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 LogRotation
impl Debug for LogRotation
Source§impl<'de> Deserialize<'de> for LogRotation
impl<'de> Deserialize<'de> for LogRotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LogRotation
impl Display for LogRotation
Source§impl FromStr for LogRotation
impl FromStr for LogRotation
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string into a LogRotation
enum variant.
§Arguments
s
- A string slice representing the log rotation type and associated value.
§Returns
A Result<LogRotation, ConfigError>
indicating the log rotation option or an error.
§Errors
This function will return an error if the string format is invalid or if the values provided (e.g. size, time, count) are not valid.
Source§type Err = ConfigError
type Err = ConfigError
The associated error which can be returned from parsing.
Source§impl Hash for LogRotation
impl Hash for LogRotation
Source§impl Ord for LogRotation
impl Ord for LogRotation
Source§fn cmp(&self, other: &LogRotation) -> Ordering
fn cmp(&self, other: &LogRotation) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LogRotation
impl PartialEq for LogRotation
Source§impl PartialOrd for LogRotation
impl PartialOrd for LogRotation
Source§impl Serialize for LogRotation
impl Serialize for LogRotation
impl Copy for LogRotation
impl Eq for LogRotation
impl StructuralPartialEq for LogRotation
Auto Trait Implementations§
impl Freeze for LogRotation
impl RefUnwindSafe for LogRotation
impl Send for LogRotation
impl Sync for LogRotation
impl Unpin for LogRotation
impl UnwindSafe for LogRotation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.