pub enum OnDropPolicy {
IgnoreLogFileLock,
DiscardLogBuffer,
}Expand description
Defines the policy for handling log file flushing when the logger is dropped.
The available options are:
IgnoreLogFileLock: Completely ignores any log file lock and forces the log entries to be written to the file regardless of the lock status.DiscardLogBuffer: If a log file lock is enabled, the log buffer is discarded instead of writing to the file. This prevents race conditions.
The default policy is DiscardLogBuffer.
Variants§
IgnoreLogFileLock
Completely ignore log file lock and write to file anyway.
DiscardLogBuffer
Don’t write to the log file when lock is enabled.
Trait Implementations§
Source§impl Clone for OnDropPolicy
impl Clone for OnDropPolicy
Source§fn clone(&self) -> OnDropPolicy
fn clone(&self) -> OnDropPolicy
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 OnDropPolicy
impl Debug for OnDropPolicy
Source§impl Default for OnDropPolicy
impl Default for OnDropPolicy
Source§fn default() -> OnDropPolicy
fn default() -> OnDropPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OnDropPolicy
impl<'de> Deserialize<'de> for OnDropPolicy
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 OnDropPolicy
impl Display for OnDropPolicy
Source§impl Hash for OnDropPolicy
impl Hash for OnDropPolicy
Source§impl Ord for OnDropPolicy
impl Ord for OnDropPolicy
Source§fn cmp(&self, other: &OnDropPolicy) -> Ordering
fn cmp(&self, other: &OnDropPolicy) -> 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 OnDropPolicy
impl PartialEq for OnDropPolicy
Source§impl PartialOrd for OnDropPolicy
impl PartialOrd for OnDropPolicy
Source§impl Serialize for OnDropPolicy
impl Serialize for OnDropPolicy
impl Copy for OnDropPolicy
impl Eq for OnDropPolicy
impl StructuralPartialEq for OnDropPolicy
Auto Trait Implementations§
impl Freeze for OnDropPolicy
impl RefUnwindSafe for OnDropPolicy
impl Send for OnDropPolicy
impl Sync for OnDropPolicy
impl Unpin for OnDropPolicy
impl UnwindSafe for OnDropPolicy
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