pub struct WatermarkThresholds {
pub warn_pct: u8,
pub critical_pct: u8,
}Expand description
Threshold percentages for the warn / critical levels.
The OOM level fires when the allocator returns AllocError, regardless
of percentage. Default is warn_pct = 75, critical_pct = 90.
Fields§
§warn_pct: u8Fire on_warn when bytes_allocated / capacity_bytes first exceeds
this percentage. Default 75.
critical_pct: u8Fire on_critical at this percentage. Default 90.
Trait Implementations§
Source§impl Clone for WatermarkThresholds
impl Clone for WatermarkThresholds
Source§fn clone(&self) -> WatermarkThresholds
fn clone(&self) -> WatermarkThresholds
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WatermarkThresholds
Source§impl Debug for WatermarkThresholds
impl Debug for WatermarkThresholds
Source§impl Default for WatermarkThresholds
impl Default for WatermarkThresholds
impl Eq for WatermarkThresholds
Source§impl PartialEq for WatermarkThresholds
impl PartialEq for WatermarkThresholds
Source§fn eq(&self, other: &WatermarkThresholds) -> bool
fn eq(&self, other: &WatermarkThresholds) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WatermarkThresholds
Auto Trait Implementations§
impl Freeze for WatermarkThresholds
impl RefUnwindSafe for WatermarkThresholds
impl Send for WatermarkThresholds
impl Sync for WatermarkThresholds
impl Unpin for WatermarkThresholds
impl UnsafeUnpin for WatermarkThresholds
impl UnwindSafe for WatermarkThresholds
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