pub struct LinuxMemoryBuilder { /* private fields */ }
Expand description
Builder for LinuxMemory
.
Implementations§
Source§impl LinuxMemoryBuilder
impl LinuxMemoryBuilder
Sourcepub fn limit<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
pub fn limit<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
Memory limit (in bytes).
Sourcepub fn reservation<VALUE: Into<Option<i64>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn reservation<VALUE: Into<Option<i64>>>( &mut self, value: VALUE, ) -> &mut Self
Memory reservation or soft_limit (in bytes).
Sourcepub fn swap<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
pub fn swap<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
Total memory limit (memory + swap).
Sourcepub fn kernel<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
pub fn kernel<VALUE: Into<Option<i64>>>(&mut self, value: VALUE) -> &mut Self
Kernel memory limit (in bytes).
Sourcepub fn kernel_tcp<VALUE: Into<Option<i64>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn kernel_tcp<VALUE: Into<Option<i64>>>( &mut self, value: VALUE, ) -> &mut Self
Kernel memory limit for tcp (in bytes)
Sourcepub fn swappiness<VALUE: Into<Option<i64>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn swappiness<VALUE: Into<Option<i64>>>( &mut self, value: VALUE, ) -> &mut Self
How aggressive the kernel will swap memory pages.
Sourcepub fn disable_oom_killer<VALUE: Into<Option<bool>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn disable_oom_killer<VALUE: Into<Option<bool>>>( &mut self, value: VALUE, ) -> &mut Self
DisableOOMKiller disables the OOM killer for out of memory conditions
Sourcepub fn use_hierarchy<VALUE: Into<Option<bool>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn use_hierarchy<VALUE: Into<Option<bool>>>( &mut self, value: VALUE, ) -> &mut Self
Enables hierarchical memory accounting
Trait Implementations§
Source§impl Clone for LinuxMemoryBuilder
impl Clone for LinuxMemoryBuilder
Source§fn clone(&self) -> LinuxMemoryBuilder
fn clone(&self) -> LinuxMemoryBuilder
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 Default for LinuxMemoryBuilder
impl Default for LinuxMemoryBuilder
Source§fn default() -> LinuxMemoryBuilder
fn default() -> LinuxMemoryBuilder
Returns the “default value” for a type. Read more
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