pub struct SandboxResourcesPatch { /* private fields */ }Expand description
A sparse, presence-aware patch for SandboxResources.
Implementations§
Source§impl SandboxResourcesPatch
impl SandboxResourcesPatch
Sourcepub fn memory_mib(self, value: u32) -> Self
pub fn memory_mib(self, value: u32) -> Self
Set the memory_mib field in this patch.
Sourcepub fn max_memory_mib(self, value: u32) -> Self
pub fn max_memory_mib(self, value: u32) -> Self
Set the max_memory_mib field in this patch.
Sourcepub fn cpu_placement(self, value: CpuPlacement) -> Self
pub fn cpu_placement(self, value: CpuPlacement) -> Self
Set the cpu_placement field in this patch.
Sourcepub fn placement_profile(self, value: String) -> Self
pub fn placement_profile(self, value: String) -> Self
Set the placement_profile field in this patch.
Sourcepub fn thp(self, value: TransparentHugePagePolicy) -> Self
pub fn thp(self, value: TransparentHugePagePolicy) -> Self
Set the thp field in this patch.
Sourcepub fn clear_cpus(self) -> Self
pub fn clear_cpus(self) -> Self
Remove cpus from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_memory_mib(self) -> Self
pub fn clear_memory_mib(self) -> Self
Remove memory_mib from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_max_cpus(self) -> Self
pub fn clear_max_cpus(self) -> Self
Remove max_cpus from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_max_memory_mib(self) -> Self
pub fn clear_max_memory_mib(self) -> Self
Remove max_memory_mib from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_cpu_placement(self) -> Self
pub fn clear_cpu_placement(self) -> Self
Remove cpu_placement from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_placement_profile(self) -> Self
pub fn clear_placement_profile(self) -> Self
Remove placement_profile from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_thp(self) -> Self
pub fn clear_thp(self) -> Self
Remove thp from this patch so applying it leaves the target unchanged.
Sourcepub fn overlay(self, higher: Self) -> Self
pub fn overlay(self, higher: Self) -> Self
Overlay a higher-precedence patch using each field’s declared strategy.
Sourcepub fn apply_to(self, target: &mut SandboxResources)
pub fn apply_to(self, target: &mut SandboxResources)
Apply every present field to an existing value.
Sourcepub fn from_present_fields(value: SandboxResources) -> Self
pub fn from_present_fields(value: SandboxResources) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.
Trait Implementations§
Source§impl Clone for SandboxResourcesPatch
impl Clone for SandboxResourcesPatch
Source§fn clone(&self) -> SandboxResourcesPatch
fn clone(&self) -> SandboxResourcesPatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more