Skip to main content

SandboxSpecPatch

Struct SandboxSpecPatch 

Source
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: SandboxResourcesPatch

Pending update for resources. Omitted values leave the target unchanged.

§runtime: SandboxRuntimeOptionsPatch

Pending 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: NetworkSpecPatch

Pending update for network. Omitted values leave the target unchanged.

§vsock: VsockSpecPatch

Pending 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: SandboxPolicyPatch

Pending update for lifecycle. Omitted values leave the target unchanged.

Implementations§

Source§

impl SandboxSpecPatch

Source

pub fn get_env(&self) -> Option<&Vec<EnvVar>>

Borrow the pending collection for env without its merge/replacement state.

Source

pub fn get_labels(&self) -> Option<&BTreeMap<String, String>>

Borrow the pending collection for labels without its merge/replacement state.

Source

pub fn new() -> Self

Create an empty patch that leaves every target field unchanged.

Source

pub fn name(self, value: String) -> Self

Set the name field in this patch.

Source

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.

Source

pub fn image(self, value: RootfsSource) -> Self

Set the image field in this patch.

Source

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.

Source

pub fn resources(self, patch: SandboxResourcesPatch) -> Self

Set the resources field in this patch.

Source

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.

Source

pub fn runtime(self, patch: SandboxRuntimeOptionsPatch) -> Self

Set the runtime field in this patch.

Source

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.

Source

pub fn env(self, value: Vec<EnvVar>) -> Self

Merge value into the env field.

Source

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.

Source

pub fn labels(self, value: BTreeMap<String, String>) -> Self

Merge value into the labels field.

Source

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.

Source

pub fn rlimits(self, value: Vec<Rlimit>) -> Self

Set the rlimits field in this patch.

Source

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.

Source

pub fn mounts(self, value: Vec<VolumeMount>) -> Self

Set the mounts field in this patch.

Source

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.

Source

pub fn patches(self, value: Vec<Patch>) -> Self

Set the patches field in this patch.

Source

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.

Source

pub fn network(self, patch: NetworkSpecPatch) -> Self

Set the network field in this patch.

Source

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.

Source

pub fn vsock(self, patch: VsockSpecPatch) -> Self

Set the vsock field in this patch.

Source

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.

Source

pub fn init(self, value: HandoffInit) -> Self

Set the init field in this patch.

Source

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.

Source

pub fn pull_policy(self, value: PullPolicy) -> Self

Set the pull_policy field in this patch.

Source

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.

Source

pub fn security_profile(self, value: SecurityProfile) -> Self

Set the security_profile field in this patch.

Source

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.

Source

pub fn deployment_profile(self, value: DeploymentProfile) -> Self

Set the deployment_profile field in this patch.

Source

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.

Source

pub fn lifecycle(self, patch: SandboxPolicyPatch) -> Self

Set the lifecycle field in this patch.

Source

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.

Source

pub fn replace_env(self, value: Vec<EnvVar>) -> Self

Replace the complete env field.

Source

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.

Source

pub fn replace_labels(self, value: BTreeMap<String, String>) -> Self

Replace the complete labels field.

Source

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.

Source

pub fn clear_name(self) -> Self

Remove name from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_image(self) -> Self

Remove image from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_resources(self) -> Self

Remove resources from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_runtime(self) -> Self

Remove runtime from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_env(self) -> Self

Remove env from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_labels(self) -> Self

Remove labels from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_rlimits(self) -> Self

Remove rlimits from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_mounts(self) -> Self

Remove mounts from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_patches(self) -> Self

Remove patches from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_network(self) -> Self

Remove network from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_vsock(self) -> Self

Remove vsock from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_init(self) -> Self

Remove init from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_pull_policy(self) -> Self

Remove pull_policy from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_security_profile(self) -> Self

Remove security_profile from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_deployment_profile(self) -> Self

Remove deployment_profile from this patch so applying it leaves the target unchanged.

Source

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.

Source

pub fn clear_lifecycle(self) -> Self

Remove lifecycle from this patch so applying it leaves the target unchanged.

Source

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.

Source

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.

Source

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.

Source

pub fn overlay(self, higher: Self) -> Self

Overlay a higher-precedence patch using each field’s declared strategy.

Source

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.

Source

pub fn apply_to(self, target: &mut SandboxSpec)

Apply every present field to an existing value.

Source

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.

Source

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 SandboxSpecPatch

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SandboxSpecPatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SandboxSpecPatch

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<SandboxSpec> for SandboxSpecPatch

Source§

fn from(value: SandboxSpec) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.