#[non_exhaustive]pub struct SystemResourceLimitsBuilder { /* private fields */ }Expand description
A builder for SystemResourceLimits.
Implementations§
source§impl SystemResourceLimitsBuilder
impl SystemResourceLimitsBuilder
sourcepub fn memory(self, input: i64) -> Self
pub fn memory(self, input: i64) -> Self
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
sourcepub fn set_memory(self, input: Option<i64>) -> Self
pub fn set_memory(self, input: Option<i64>) -> Self
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
sourcepub fn get_memory(&self) -> &Option<i64>
pub fn get_memory(&self) -> &Option<i64>
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
sourcepub fn cpus(self, input: f64) -> Self
pub fn cpus(self, input: f64) -> Self
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
sourcepub fn set_cpus(self, input: Option<f64>) -> Self
pub fn set_cpus(self, input: Option<f64>) -> Self
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
sourcepub fn get_cpus(&self) -> &Option<f64>
pub fn get_cpus(&self) -> &Option<f64>
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
sourcepub fn build(self) -> SystemResourceLimits
pub fn build(self) -> SystemResourceLimits
Consumes the builder and constructs a SystemResourceLimits.
Trait Implementations§
source§impl Clone for SystemResourceLimitsBuilder
impl Clone for SystemResourceLimitsBuilder
source§fn clone(&self) -> SystemResourceLimitsBuilder
fn clone(&self) -> SystemResourceLimitsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SystemResourceLimitsBuilder
impl Debug for SystemResourceLimitsBuilder
source§impl Default for SystemResourceLimitsBuilder
impl Default for SystemResourceLimitsBuilder
source§fn default() -> SystemResourceLimitsBuilder
fn default() -> SystemResourceLimitsBuilder
impl StructuralPartialEq for SystemResourceLimitsBuilder
Auto Trait Implementations§
impl Freeze for SystemResourceLimitsBuilder
impl RefUnwindSafe for SystemResourceLimitsBuilder
impl Send for SystemResourceLimitsBuilder
impl Sync for SystemResourceLimitsBuilder
impl Unpin for SystemResourceLimitsBuilder
impl UnwindSafe for SystemResourceLimitsBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more