#[non_exhaustive]pub enum MemoryPriority {
VeryLow,
Low,
Medium,
BelowNormal,
Normal,
}Expand description
How a thread’s memory pages compete for physical memory.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
VeryLow
The lowest priority; pages are trimmed first.
Low
Below BelowNormal.
Medium
Between Low and BelowNormal.
BelowNormal
Below the default.
Normal
The default for a thread.
Implementations§
Source§impl MemoryPriority
impl MemoryPriority
Sourcepub fn current() -> Result<Self, DeclaredError>
pub fn current() -> Result<Self, DeclaredError>
Read the calling thread’s current memory priority.
Provided because the value is readable, which is what makes this aspect’s declared status a deliberate choice rather than a limitation. A consumer that decides transplanting is right for it can read the value here and declare it; the crate simply does not do so on the caller’s behalf.
§Errors
Returns DeclaredError if the query fails or reports a value this
enumeration does not name.
Trait Implementations§
Source§impl Clone for MemoryPriority
impl Clone for MemoryPriority
Source§fn clone(&self) -> MemoryPriority
fn clone(&self) -> MemoryPriority
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 MemoryPriority
Source§impl Debug for MemoryPriority
impl Debug for MemoryPriority
impl Eq for MemoryPriority
Source§impl Hash for MemoryPriority
impl Hash for MemoryPriority
Source§impl PartialEq for MemoryPriority
impl PartialEq for MemoryPriority
impl StructuralPartialEq for MemoryPriority
Auto Trait Implementations§
impl Freeze for MemoryPriority
impl RefUnwindSafe for MemoryPriority
impl Send for MemoryPriority
impl Sync for MemoryPriority
impl Unpin for MemoryPriority
impl UnsafeUnpin for MemoryPriority
impl UnwindSafe for MemoryPriority
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