pub struct MemoryLimits {
pub soft_limit: Option<u64>,
pub hard_limit: Option<u64>,
}
Expand description
Represents a constraint on memory usage
Fields§
§soft_limit: Option<u64>
§hard_limit: Option<u64>
Implementations§
source§impl MemoryLimits
impl MemoryLimits
pub fn min(self, other: Self) -> Self
pub fn is_unlimited(&self) -> bool
source§impl MemoryLimits
impl MemoryLimits
pub fn get_rlimits() -> Result<Self>
pub fn get_cgroup(v2: bool) -> Result<Self>
Trait Implementations§
source§impl Clone for MemoryLimits
impl Clone for MemoryLimits
source§fn clone(&self) -> MemoryLimits
fn clone(&self) -> MemoryLimits
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 MemoryLimits
impl Debug for MemoryLimits
source§impl Display for MemoryLimits
impl Display for MemoryLimits
impl Copy for MemoryLimits
Auto Trait Implementations§
impl Freeze for MemoryLimits
impl RefUnwindSafe for MemoryLimits
impl Send for MemoryLimits
impl Sync for MemoryLimits
impl Unpin for MemoryLimits
impl UnwindSafe for MemoryLimits
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)