pub enum MemoryPressure {
Low,
Moderate,
High,
Critical,
}Expand description
Memory pressure level.
The current memory pressure level is computed as a function of the current process
resident set size (RSS) and the user-configured memory limit (max_rss).
As the memory pressure level increases, the system will apply increasing backpressure to push state cached in memory to storage.
Low: less than 85% of the user-configured memory limit has been allocated.Moderate: between 85% and 90% of the user-configured memory limit has been allocated.High: between 90% and 95% of the user-configured memory limit has been allocated.Critical: more than 95% of the user-configured memory limit has been allocated.
JSON schema
{
"description": "Memory pressure level.\n\nThe current memory pressure level is computed as a function of the current process\nresident set size (RSS) and the user-configured memory limit (`max_rss`).\n\nAs the memory pressure level increases, the system will apply increasing backpressure to\npush state cached in memory to storage.\n\n- `Low`: less than 85% of the user-configured memory limit has been allocated.\n- `Moderate`: between 85% and 90% of the user-configured memory limit has been allocated.\n- `High`: between 90% and 95% of the user-configured memory limit has been allocated.\n- `Critical`: more than 95% of the user-configured memory limit has been allocated.",
"type": "string",
"enum": [
"low",
"moderate",
"high",
"critical"
]
}Variants§
Trait Implementations§
Source§impl Clone for MemoryPressure
impl Clone for MemoryPressure
Source§fn clone(&self) -> MemoryPressure
fn clone(&self) -> MemoryPressure
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 moreSource§impl Debug for MemoryPressure
impl Debug for MemoryPressure
Source§impl<'de> Deserialize<'de> for MemoryPressure
impl<'de> Deserialize<'de> for MemoryPressure
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 From<&MemoryPressure> for MemoryPressure
impl From<&MemoryPressure> for MemoryPressure
Source§fn from(value: &MemoryPressure) -> Self
fn from(value: &MemoryPressure) -> Self
Converts to this type from the input type.
Source§impl FromStr for MemoryPressure
impl FromStr for MemoryPressure
Source§impl Hash for MemoryPressure
impl Hash for MemoryPressure
Source§impl Ord for MemoryPressure
impl Ord for MemoryPressure
Source§fn cmp(&self, other: &MemoryPressure) -> Ordering
fn cmp(&self, other: &MemoryPressure) -> Ordering
1.21.0 (const: unstable) · 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 MemoryPressure
impl PartialEq for MemoryPressure
Source§fn eq(&self, other: &MemoryPressure) -> bool
fn eq(&self, other: &MemoryPressure) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MemoryPressure
impl PartialOrd for MemoryPressure
Source§impl Serialize for MemoryPressure
impl Serialize for MemoryPressure
Source§impl ToString for MemoryPressure
impl ToString for MemoryPressure
Source§impl TryFrom<&String> for MemoryPressure
impl TryFrom<&String> for MemoryPressure
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for MemoryPressure
impl TryFrom<&str> for MemoryPressure
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for MemoryPressure
impl TryFrom<String> for MemoryPressure
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for MemoryPressure
impl Eq for MemoryPressure
impl StructuralPartialEq for MemoryPressure
Auto Trait Implementations§
impl Freeze for MemoryPressure
impl RefUnwindSafe for MemoryPressure
impl Send for MemoryPressure
impl Sync for MemoryPressure
impl Unpin for MemoryPressure
impl UnsafeUnpin for MemoryPressure
impl UnwindSafe for MemoryPressure
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.