pub struct SandboxConfigPatch { /* private fields */ }Expand description
A sparse, presence-aware patch for SandboxSpec.
Implementations§
Source§impl SandboxConfigPatch
impl SandboxConfigPatch
Sourcepub fn image(self, value: RootfsSource) -> Self
pub fn image(self, value: RootfsSource) -> Self
Set the image field in this patch.
Sourcepub fn resources(self, patch: SandboxResourcesPatch) -> Self
pub fn resources(self, patch: SandboxResourcesPatch) -> Self
Set the resources field in this patch.
Sourcepub fn runtime(self, patch: SandboxRuntimeOptionsPatch) -> Self
pub fn runtime(self, patch: SandboxRuntimeOptionsPatch) -> Self
Set the runtime field in this patch.
Sourcepub fn labels(self, value: BTreeMap<String, String>) -> Self
pub fn labels(self, value: BTreeMap<String, String>) -> Self
Merge value into the labels field.
Sourcepub fn mounts(self, value: Vec<VolumeMount>) -> Self
pub fn mounts(self, value: Vec<VolumeMount>) -> Self
Set the mounts field in this patch.
Sourcepub fn network(self, patch: NetworkSpecPatch) -> Self
pub fn network(self, patch: NetworkSpecPatch) -> Self
Set the network field in this patch.
Sourcepub fn vsock(self, patch: VsockSpecPatch) -> Self
pub fn vsock(self, patch: VsockSpecPatch) -> Self
Set the vsock field in this patch.
Sourcepub fn init(self, value: HandoffInit) -> Self
pub fn init(self, value: HandoffInit) -> Self
Set the init field in this patch.
Sourcepub fn pull_policy(self, value: PullPolicy) -> Self
pub fn pull_policy(self, value: PullPolicy) -> Self
Set the pull_policy field in this patch.
Sourcepub fn security_profile(self, value: SecurityProfile) -> Self
pub fn security_profile(self, value: SecurityProfile) -> Self
Set the security_profile field in this patch.
Sourcepub fn deployment_profile(self, value: DeploymentProfile) -> Self
pub fn deployment_profile(self, value: DeploymentProfile) -> Self
Set the deployment_profile field in this patch.
Sourcepub fn lifecycle(self, patch: SandboxPolicyPatch) -> Self
pub fn lifecycle(self, patch: SandboxPolicyPatch) -> Self
Set the lifecycle field in this patch.
Sourcepub fn replace_env(self, value: Vec<EnvVar>) -> Self
pub fn replace_env(self, value: Vec<EnvVar>) -> Self
Replace the complete env field.
Sourcepub fn replace_labels(self, value: BTreeMap<String, String>) -> Self
pub fn replace_labels(self, value: BTreeMap<String, String>) -> Self
Replace the complete labels field.
Sourcepub fn clear_name(self) -> Self
pub fn clear_name(self) -> Self
Remove name from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_image(self) -> Self
pub fn clear_image(self) -> Self
Remove image from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_resources(self) -> Self
pub fn clear_resources(self) -> Self
Remove resources from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_runtime(self) -> Self
pub fn clear_runtime(self) -> Self
Remove runtime from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_env(self) -> Self
pub fn clear_env(self) -> Self
Remove env from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_labels(self) -> Self
pub fn clear_labels(self) -> Self
Remove labels from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_rlimits(self) -> Self
pub fn clear_rlimits(self) -> Self
Remove rlimits from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_mounts(self) -> Self
pub fn clear_mounts(self) -> Self
Remove mounts from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_patches(self) -> Self
pub fn clear_patches(self) -> Self
Remove patches from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_network(self) -> Self
pub fn clear_network(self) -> Self
Remove network from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_vsock(self) -> Self
pub fn clear_vsock(self) -> Self
Remove vsock from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_init(self) -> Self
pub fn clear_init(self) -> Self
Remove init from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_pull_policy(self) -> Self
pub fn clear_pull_policy(self) -> Self
Remove pull_policy from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_security_profile(self) -> Self
pub fn clear_security_profile(self) -> Self
Remove security_profile from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_deployment_profile(self) -> Self
pub fn clear_deployment_profile(self) -> Self
Remove deployment_profile from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_lifecycle(self) -> Self
pub fn clear_lifecycle(self) -> Self
Remove lifecycle from this patch so applying it leaves the target unchanged.
Sourcepub fn modify_resources(
self,
modify: impl FnOnce(SandboxResourcesPatch) -> SandboxResourcesPatch,
) -> Self
pub fn modify_resources( self, modify: impl FnOnce(SandboxResourcesPatch) -> SandboxResourcesPatch, ) -> Self
Transform the current nested resources patch.
Sourcepub fn modify_runtime(
self,
modify: impl FnOnce(SandboxRuntimeOptionsPatch) -> SandboxRuntimeOptionsPatch,
) -> Self
pub fn modify_runtime( self, modify: impl FnOnce(SandboxRuntimeOptionsPatch) -> SandboxRuntimeOptionsPatch, ) -> Self
Transform the current nested runtime patch.
Sourcepub fn modify_network(
self,
modify: impl FnOnce(NetworkSpecPatch) -> NetworkSpecPatch,
) -> Self
pub fn modify_network( self, modify: impl FnOnce(NetworkSpecPatch) -> NetworkSpecPatch, ) -> Self
Transform the current nested network patch.
Sourcepub fn modify_vsock(
self,
modify: impl FnOnce(VsockSpecPatch) -> VsockSpecPatch,
) -> Self
pub fn modify_vsock( self, modify: impl FnOnce(VsockSpecPatch) -> VsockSpecPatch, ) -> Self
Transform the current nested vsock patch.
Sourcepub fn modify_lifecycle(
self,
modify: impl FnOnce(SandboxPolicyPatch) -> SandboxPolicyPatch,
) -> Self
pub fn modify_lifecycle( self, modify: impl FnOnce(SandboxPolicyPatch) -> SandboxPolicyPatch, ) -> Self
Transform the current nested lifecycle patch.
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 SandboxSpec)
pub fn apply_to(self, target: &mut SandboxSpec)
Apply every present field to an existing value.
Sourcepub fn from_present_fields(value: SandboxSpec) -> Self
pub fn from_present_fields(value: SandboxSpec) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.
Trait Implementations§
Source§impl Clone for SandboxConfigPatch
impl Clone for SandboxConfigPatch
Source§fn clone(&self) -> SandboxConfigPatch
fn clone(&self) -> SandboxConfigPatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more