pub struct SandboxSpecPatch {Show 14 fields
pub name: Option<String>,
pub image: Option<RootfsSource>,
pub resources: SandboxResourcesPatch,
pub runtime: SandboxRuntimeOptionsPatch,
pub rlimits: Option<Vec<Rlimit>>,
pub mounts: Option<Vec<VolumeMount>>,
pub patches: Option<Vec<Patch>>,
pub network: NetworkSpecPatch,
pub vsock: VsockSpecPatch,
pub init: Option<HandoffInit>,
pub pull_policy: Option<PullPolicy>,
pub security_profile: Option<SecurityProfile>,
pub deployment_profile: Option<DeploymentProfile>,
pub lifecycle: SandboxPolicyPatch,
/* private fields */
}Expand description
A sparse, presence-aware patch for SandboxSpec.
Fields§
§name: Option<String>Pending update for name. Omitted values leave the target unchanged.
image: Option<RootfsSource>Pending update for image. Omitted values leave the target unchanged.
resources: SandboxResourcesPatchPending update for resources. Omitted values leave the target unchanged.
runtime: SandboxRuntimeOptionsPatchPending update for runtime. Omitted values leave the target unchanged.
rlimits: Option<Vec<Rlimit>>Pending update for rlimits. Omitted values leave the target unchanged.
mounts: Option<Vec<VolumeMount>>Pending update for mounts. Omitted values leave the target unchanged.
patches: Option<Vec<Patch>>Pending update for patches. Omitted values leave the target unchanged.
network: NetworkSpecPatchPending update for network. Omitted values leave the target unchanged.
vsock: VsockSpecPatchPending update for vsock. Omitted values leave the target unchanged.
init: Option<HandoffInit>Pending update for init. Omitted values leave the target unchanged.
pull_policy: Option<PullPolicy>Pending update for pull_policy. Omitted values leave the target unchanged.
security_profile: Option<SecurityProfile>Pending update for security_profile. Omitted values leave the target unchanged.
deployment_profile: Option<DeploymentProfile>Pending update for deployment_profile. Omitted values leave the target unchanged.
lifecycle: SandboxPolicyPatchPending update for lifecycle. Omitted values leave the target unchanged.
Implementations§
Source§impl SandboxSpecPatch
impl SandboxSpecPatch
Sourcepub fn get_env(&self) -> Option<&Vec<EnvVar>>
pub fn get_env(&self) -> Option<&Vec<EnvVar>>
Borrow the pending collection for env without its merge/replacement state.
Sourcepub fn get_labels(&self) -> Option<&BTreeMap<String, String>>
pub fn get_labels(&self) -> Option<&BTreeMap<String, String>>
Borrow the pending collection for labels without its merge/replacement state.
Sourcepub fn name_mut(&mut self, value: String) -> &mut Self
pub fn name_mut(&mut self, value: String) -> &mut Self
Set the name field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn image(self, value: RootfsSource) -> Self
pub fn image(self, value: RootfsSource) -> Self
Set the image field in this patch.
Sourcepub fn image_mut(&mut self, value: RootfsSource) -> &mut Self
pub fn image_mut(&mut self, value: RootfsSource) -> &mut Self
Set the image field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn resources(self, patch: SandboxResourcesPatch) -> Self
pub fn resources(self, patch: SandboxResourcesPatch) -> Self
Set the resources field in this patch.
Sourcepub fn resources_mut(&mut self, patch: SandboxResourcesPatch) -> &mut Self
pub fn resources_mut(&mut self, patch: SandboxResourcesPatch) -> &mut Self
Set the resources field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn runtime(self, patch: SandboxRuntimeOptionsPatch) -> Self
pub fn runtime(self, patch: SandboxRuntimeOptionsPatch) -> Self
Set the runtime field in this patch.
Sourcepub fn runtime_mut(&mut self, patch: SandboxRuntimeOptionsPatch) -> &mut Self
pub fn runtime_mut(&mut self, patch: SandboxRuntimeOptionsPatch) -> &mut Self
Set the runtime field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn env_mut(&mut self, value: Vec<EnvVar>) -> &mut Self
pub fn env_mut(&mut self, value: Vec<EnvVar>) -> &mut Self
Merge value into the env field.
Mutates this patch in place and returns it for chaining.
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 labels_mut(&mut self, value: BTreeMap<String, String>) -> &mut Self
pub fn labels_mut(&mut self, value: BTreeMap<String, String>) -> &mut Self
Merge value into the labels field.
Mutates this patch in place and returns it for chaining.
Sourcepub fn rlimits_mut(&mut self, value: Vec<Rlimit>) -> &mut Self
pub fn rlimits_mut(&mut self, value: Vec<Rlimit>) -> &mut Self
Set the rlimits field in this patch.
Mutates this patch in place and returns it for chaining.
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 mounts_mut(&mut self, value: Vec<VolumeMount>) -> &mut Self
pub fn mounts_mut(&mut self, value: Vec<VolumeMount>) -> &mut Self
Set the mounts field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn patches_mut(&mut self, value: Vec<Patch>) -> &mut Self
pub fn patches_mut(&mut self, value: Vec<Patch>) -> &mut Self
Set the patches field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn network(self, patch: NetworkSpecPatch) -> Self
pub fn network(self, patch: NetworkSpecPatch) -> Self
Set the network field in this patch.
Sourcepub fn network_mut(&mut self, patch: NetworkSpecPatch) -> &mut Self
pub fn network_mut(&mut self, patch: NetworkSpecPatch) -> &mut Self
Set the network field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn vsock(self, patch: VsockSpecPatch) -> Self
pub fn vsock(self, patch: VsockSpecPatch) -> Self
Set the vsock field in this patch.
Sourcepub fn vsock_mut(&mut self, patch: VsockSpecPatch) -> &mut Self
pub fn vsock_mut(&mut self, patch: VsockSpecPatch) -> &mut Self
Set the vsock field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn init(self, value: HandoffInit) -> Self
pub fn init(self, value: HandoffInit) -> Self
Set the init field in this patch.
Sourcepub fn init_mut(&mut self, value: HandoffInit) -> &mut Self
pub fn init_mut(&mut self, value: HandoffInit) -> &mut Self
Set the init field in this patch.
Mutates this patch in place and returns it for chaining.
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 pull_policy_mut(&mut self, value: PullPolicy) -> &mut Self
pub fn pull_policy_mut(&mut self, value: PullPolicy) -> &mut Self
Set the pull_policy field in this patch.
Mutates this patch in place and returns it for chaining.
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 security_profile_mut(&mut self, value: SecurityProfile) -> &mut Self
pub fn security_profile_mut(&mut self, value: SecurityProfile) -> &mut Self
Set the security_profile field in this patch.
Mutates this patch in place and returns it for chaining.
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 deployment_profile_mut(&mut self, value: DeploymentProfile) -> &mut Self
pub fn deployment_profile_mut(&mut self, value: DeploymentProfile) -> &mut Self
Set the deployment_profile field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn lifecycle(self, patch: SandboxPolicyPatch) -> Self
pub fn lifecycle(self, patch: SandboxPolicyPatch) -> Self
Set the lifecycle field in this patch.
Sourcepub fn lifecycle_mut(&mut self, patch: SandboxPolicyPatch) -> &mut Self
pub fn lifecycle_mut(&mut self, patch: SandboxPolicyPatch) -> &mut Self
Set the lifecycle field in this patch.
Mutates this patch in place and returns it for chaining.
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_env_mut(&mut self, value: Vec<EnvVar>) -> &mut Self
pub fn replace_env_mut(&mut self, value: Vec<EnvVar>) -> &mut Self
Replace the complete env field.
Mutates this patch in place and returns it for chaining.
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 replace_labels_mut(
&mut self,
value: BTreeMap<String, String>,
) -> &mut Self
pub fn replace_labels_mut( &mut self, value: BTreeMap<String, String>, ) -> &mut Self
Replace the complete labels field.
Mutates this patch in place and returns it for chaining.
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_name_mut(&mut self) -> &mut Self
pub fn clear_name_mut(&mut self) -> &mut Self
Remove name from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_image_mut(&mut self) -> &mut Self
pub fn clear_image_mut(&mut self) -> &mut Self
Remove image from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_resources_mut(&mut self) -> &mut Self
pub fn clear_resources_mut(&mut self) -> &mut Self
Remove resources from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_runtime_mut(&mut self) -> &mut Self
pub fn clear_runtime_mut(&mut self) -> &mut Self
Remove runtime from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_env_mut(&mut self) -> &mut Self
pub fn clear_env_mut(&mut self) -> &mut Self
Remove env from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_labels_mut(&mut self) -> &mut Self
pub fn clear_labels_mut(&mut self) -> &mut Self
Remove labels from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_rlimits_mut(&mut self) -> &mut Self
pub fn clear_rlimits_mut(&mut self) -> &mut Self
Remove rlimits from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_mounts_mut(&mut self) -> &mut Self
pub fn clear_mounts_mut(&mut self) -> &mut Self
Remove mounts from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_patches_mut(&mut self) -> &mut Self
pub fn clear_patches_mut(&mut self) -> &mut Self
Remove patches from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_network_mut(&mut self) -> &mut Self
pub fn clear_network_mut(&mut self) -> &mut Self
Remove network from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_vsock_mut(&mut self) -> &mut Self
pub fn clear_vsock_mut(&mut self) -> &mut Self
Remove vsock from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_init_mut(&mut self) -> &mut Self
pub fn clear_init_mut(&mut self) -> &mut Self
Remove init from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_pull_policy_mut(&mut self) -> &mut Self
pub fn clear_pull_policy_mut(&mut self) -> &mut Self
Remove pull_policy from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_security_profile_mut(&mut self) -> &mut Self
pub fn clear_security_profile_mut(&mut self) -> &mut Self
Remove security_profile from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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_deployment_profile_mut(&mut self) -> &mut Self
pub fn clear_deployment_profile_mut(&mut self) -> &mut Self
Remove deployment_profile from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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 clear_lifecycle_mut(&mut self) -> &mut Self
pub fn clear_lifecycle_mut(&mut self) -> &mut Self
Remove lifecycle from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn get_env_mut(&mut self) -> &mut Vec<EnvVar>
pub fn get_env_mut(&mut self) -> &mut Vec<EnvVar>
Borrow the pending env collection mutably. Initializes an absent collection empty in merge mode and preserves an existing replacement mode. Edits pending values directly without running the merge strategy.
Sourcepub fn get_labels_mut(&mut self) -> &mut BTreeMap<String, String>
pub fn get_labels_mut(&mut self) -> &mut BTreeMap<String, String>
Borrow the pending labels collection mutably. Initializes an absent collection empty in merge mode and preserves an existing replacement mode. Edits pending values directly without running the merge strategy.
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 overlay_mut(&mut self, higher: Self) -> &mut Self
pub fn overlay_mut(&mut self, higher: Self) -> &mut Self
Overlay a higher-precedence patch using each field’s declared strategy. Mutates this patch in place and returns it for chaining.
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 into_config(self) -> SandboxSpec
pub fn into_config(self) -> SandboxSpec
Apply this patch to the configuration’s defaults.
Compose all overlays first. This conversion does not validate the result.
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.