Enum spirit_log::background::OverflowMode [−][src]
#[non_exhaustive] pub enum OverflowMode { Block, DropMsg, DropMsgSilently, AdaptiveDrop { from_level: Level, fill_limit: usize, }, }
Expand description
Selection of how to act if the channel to the logger thread is full.
This enum is non-exhaustive. Adding more variants in the future will not be considered a breaking change.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Blocks until there’s enough space to push the message.
If there’s not enough space in the channel, the message is dropped and counted.
Subsequently, the thread will log how many messages were lost.
Drop the messages that don’t without any indication it happened.
Drop less severe messages sooner than filling the whole buffer.
If the buffer is completely full, it acts like the DropMsg
. If
it’s not full, but has more than fill_limit
messages in it, messages with severity
from_level
or less severe are dropped, while more severe are still inserted into the
buffer.
Both limits are inclusive.
Fields of AdaptiveDrop
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for OverflowMode
impl Send for OverflowMode
impl Sync for OverflowMode
impl Unpin for OverflowMode
impl UnwindSafe for OverflowMode
Blanket Implementations
Mutably borrows from an owned value. Read more