pub struct SandboxPolicyPatch {
pub ephemeral: Option<bool>,
pub max_duration_secs: Option<u64>,
pub idle_timeout_secs: Option<u64>,
}Expand description
A sparse, presence-aware patch for SandboxPolicy.
Fields§
§ephemeral: Option<bool>Pending update for ephemeral. Omitted values leave the target unchanged.
max_duration_secs: Option<u64>Pending update for max_duration_secs. Omitted values leave the target unchanged.
idle_timeout_secs: Option<u64>Pending update for idle_timeout_secs. Omitted values leave the target unchanged.
Implementations§
Source§impl SandboxPolicyPatch
impl SandboxPolicyPatch
Sourcepub fn ephemeral_mut(&mut self, value: bool) -> &mut Self
pub fn ephemeral_mut(&mut self, value: bool) -> &mut Self
Set the ephemeral field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn max_duration_secs(self, value: u64) -> Self
pub fn max_duration_secs(self, value: u64) -> Self
Set the max_duration_secs field in this patch.
Sourcepub fn max_duration_secs_mut(&mut self, value: u64) -> &mut Self
pub fn max_duration_secs_mut(&mut self, value: u64) -> &mut Self
Set the max_duration_secs field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn idle_timeout_secs(self, value: u64) -> Self
pub fn idle_timeout_secs(self, value: u64) -> Self
Set the idle_timeout_secs field in this patch.
Sourcepub fn idle_timeout_secs_mut(&mut self, value: u64) -> &mut Self
pub fn idle_timeout_secs_mut(&mut self, value: u64) -> &mut Self
Set the idle_timeout_secs field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ephemeral(self) -> Self
pub fn clear_ephemeral(self) -> Self
Remove ephemeral from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ephemeral_mut(&mut self) -> &mut Self
pub fn clear_ephemeral_mut(&mut self) -> &mut Self
Remove ephemeral from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_max_duration_secs(self) -> Self
pub fn clear_max_duration_secs(self) -> Self
Remove max_duration_secs from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_max_duration_secs_mut(&mut self) -> &mut Self
pub fn clear_max_duration_secs_mut(&mut self) -> &mut Self
Remove max_duration_secs from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_idle_timeout_secs(self) -> Self
pub fn clear_idle_timeout_secs(self) -> Self
Remove idle_timeout_secs from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_idle_timeout_secs_mut(&mut self) -> &mut Self
pub fn clear_idle_timeout_secs_mut(&mut self) -> &mut Self
Remove idle_timeout_secs from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
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 SandboxPolicy)
pub fn apply_to(self, target: &mut SandboxPolicy)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> SandboxPolicy
pub fn into_config(self) -> SandboxPolicy
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: SandboxPolicy) -> Self
pub fn from_present_fields(value: SandboxPolicy) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.