pub struct LinuxMemoryBuilder { /* private fields */ }
Expand description
Builder for LinuxMemory
.
Implementations§
Source§impl LinuxMemoryBuilder
impl LinuxMemoryBuilder
Sourcepub fn reservation<VALUE: Into<i64>>(self, value: VALUE) -> Self
pub fn reservation<VALUE: Into<i64>>(self, value: VALUE) -> Self
Memory reservation or soft_limit (in bytes).
Sourcepub fn kernel_tcp<VALUE: Into<i64>>(self, value: VALUE) -> Self
pub fn kernel_tcp<VALUE: Into<i64>>(self, value: VALUE) -> Self
Kernel memory limit for tcp (in bytes).
Sourcepub fn swappiness<VALUE: Into<u64>>(self, value: VALUE) -> Self
pub fn swappiness<VALUE: Into<u64>>(self, value: VALUE) -> Self
How aggressive the kernel will swap memory pages.
Sourcepub fn disable_oom_killer<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn disable_oom_killer<VALUE: Into<bool>>(self, value: VALUE) -> Self
DisableOOMKiller disables the OOM killer for out of memory conditions.
Sourcepub fn use_hierarchy<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn use_hierarchy<VALUE: Into<bool>>(self, value: VALUE) -> Self
Enables hierarchical memory accounting
Sourcepub fn check_before_update<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn check_before_update<VALUE: Into<bool>>(self, value: VALUE) -> Self
Enables checking if a new memory limit is lower
Sourcepub fn build(self) -> Result<LinuxMemory, OciSpecError>
pub fn build(self) -> Result<LinuxMemory, OciSpecError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinuxMemoryBuilder
impl RefUnwindSafe for LinuxMemoryBuilder
impl Send for LinuxMemoryBuilder
impl Sync for LinuxMemoryBuilder
impl Unpin for LinuxMemoryBuilder
impl UnwindSafe for LinuxMemoryBuilder
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