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.
Auto Trait Implementations§
impl Freeze for MemoryResourceBuilder
impl RefUnwindSafe for MemoryResourceBuilder
impl Send for MemoryResourceBuilder
impl Sync for MemoryResourceBuilder
impl Unpin for MemoryResourceBuilder
impl UnwindSafe for MemoryResourceBuilder
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