Struct cgroups_rs::cgroup_builder::MemoryResourceBuilder
source · pub struct MemoryResourceBuilder { /* private fields */ }Expand description
A builder that configures the memory controller of a control group.
Implementations§
source§impl MemoryResourceBuilder
impl MemoryResourceBuilder
sourcepub fn kernel_memory_limit(self, kernel_memory_limit: i64) -> Self
pub fn kernel_memory_limit(self, kernel_memory_limit: i64) -> Self
See the similarly named function in the respective controller.
sourcepub fn memory_hard_limit(self, memory_hard_limit: i64) -> Self
pub fn memory_hard_limit(self, memory_hard_limit: i64) -> Self
See the similarly named function in the respective controller.
sourcepub fn memory_soft_limit(self, memory_soft_limit: i64) -> Self
pub fn memory_soft_limit(self, memory_soft_limit: i64) -> Self
See the similarly named function in the respective controller.
sourcepub fn kernel_tcp_memory_limit(self, kernel_tcp_memory_limit: i64) -> Self
pub fn kernel_tcp_memory_limit(self, kernel_tcp_memory_limit: i64) -> Self
See the similarly named function in the respective controller.
sourcepub fn memory_swap_limit(self, memory_swap_limit: i64) -> Self
pub fn memory_swap_limit(self, memory_swap_limit: i64) -> Self
See the similarly named function in the respective controller.
sourcepub fn swappiness(self, swappiness: u64) -> Self
pub fn swappiness(self, swappiness: u64) -> Self
See the similarly named function in the respective controller.
sourcepub fn done(self) -> CgroupBuilder
pub fn done(self) -> CgroupBuilder
Finish the construction of the memory resources of a control group.