Struct oci_spec::runtime::LinuxMemoryBuilder
source · 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