pub struct SandboxRuntimeOptionsPatch {
pub workdir: Option<Option<String>>,
pub shell: Option<Option<String>>,
pub entrypoint: Option<Vec<String>>,
pub cmd: Option<Vec<String>>,
pub hostname: Option<String>,
pub user: Option<String>,
pub log_level: Option<Option<SandboxLogLevel>>,
pub metrics_sample_interval_ms: Option<Option<u64>>,
pub disable_metrics_sample: Option<bool>,
/* private fields */
}Expand description
A sparse, presence-aware patch for SandboxRuntimeOptions.
Fields§
§workdir: Option<Option<String>>Pending update for workdir. Omitted values leave the target unchanged.
shell: Option<Option<String>>Pending update for shell. Omitted values leave the target unchanged.
entrypoint: Option<Vec<String>>Pending update for entrypoint. Omitted values leave the target unchanged.
cmd: Option<Vec<String>>Pending update for cmd. Omitted values leave the target unchanged.
hostname: Option<String>Pending update for hostname. Omitted values leave the target unchanged.
user: Option<String>Pending update for user. Omitted values leave the target unchanged.
log_level: Option<Option<SandboxLogLevel>>Pending update for log_level. Omitted values leave the target unchanged.
metrics_sample_interval_ms: Option<Option<u64>>Pending update for metrics_sample_interval_ms. Omitted values leave the target unchanged.
disable_metrics_sample: Option<bool>Pending update for disable_metrics_sample. Omitted values leave the target unchanged.
Implementations§
Source§impl SandboxRuntimeOptionsPatch
impl SandboxRuntimeOptionsPatch
Sourcepub fn get_scripts(&self) -> Option<&BTreeMap<String, String>>
pub fn get_scripts(&self) -> Option<&BTreeMap<String, String>>
Borrow the pending collection for scripts without its merge/replacement state.
Sourcepub fn set_workdir(self, value: Option<String>) -> Self
pub fn set_workdir(self, value: Option<String>) -> Self
Set or explicitly clear workdir.
Sourcepub fn set_workdir_mut(&mut self, value: Option<String>) -> &mut Self
pub fn set_workdir_mut(&mut self, value: Option<String>) -> &mut Self
Set or explicitly clear workdir.
Mutates this patch in place and returns it for chaining.
Sourcepub fn workdir_mut(&mut self, value: String) -> &mut Self
pub fn workdir_mut(&mut self, value: String) -> &mut Self
Set the workdir field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn set_shell_mut(&mut self, value: Option<String>) -> &mut Self
pub fn set_shell_mut(&mut self, value: Option<String>) -> &mut Self
Set or explicitly clear shell.
Mutates this patch in place and returns it for chaining.
Sourcepub fn shell_mut(&mut self, value: String) -> &mut Self
pub fn shell_mut(&mut self, value: String) -> &mut Self
Set the shell field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn scripts(self, value: BTreeMap<String, String>) -> Self
pub fn scripts(self, value: BTreeMap<String, String>) -> Self
Merge value into the scripts field.
Sourcepub fn scripts_mut(&mut self, value: BTreeMap<String, String>) -> &mut Self
pub fn scripts_mut(&mut self, value: BTreeMap<String, String>) -> &mut Self
Merge value into the scripts field.
Mutates this patch in place and returns it for chaining.
Sourcepub fn entrypoint(self, value: Vec<String>) -> Self
pub fn entrypoint(self, value: Vec<String>) -> Self
Set the entrypoint field in this patch.
Sourcepub fn entrypoint_mut(&mut self, value: Vec<String>) -> &mut Self
pub fn entrypoint_mut(&mut self, value: Vec<String>) -> &mut Self
Set the entrypoint field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn cmd_mut(&mut self, value: Vec<String>) -> &mut Self
pub fn cmd_mut(&mut self, value: Vec<String>) -> &mut Self
Set the cmd field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn hostname_mut(&mut self, value: String) -> &mut Self
pub fn hostname_mut(&mut self, value: String) -> &mut Self
Set the hostname field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn user_mut(&mut self, value: String) -> &mut Self
pub fn user_mut(&mut self, value: String) -> &mut Self
Set the user field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn set_log_level(self, value: Option<SandboxLogLevel>) -> Self
pub fn set_log_level(self, value: Option<SandboxLogLevel>) -> Self
Set or explicitly clear log_level.
Sourcepub fn set_log_level_mut(&mut self, value: Option<SandboxLogLevel>) -> &mut Self
pub fn set_log_level_mut(&mut self, value: Option<SandboxLogLevel>) -> &mut Self
Set or explicitly clear log_level.
Mutates this patch in place and returns it for chaining.
Sourcepub fn log_level(self, value: SandboxLogLevel) -> Self
pub fn log_level(self, value: SandboxLogLevel) -> Self
Set the log_level field in this patch.
Sourcepub fn log_level_mut(&mut self, value: SandboxLogLevel) -> &mut Self
pub fn log_level_mut(&mut self, value: SandboxLogLevel) -> &mut Self
Set the log_level field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn set_metrics_sample_interval_ms(self, value: Option<u64>) -> Self
pub fn set_metrics_sample_interval_ms(self, value: Option<u64>) -> Self
Set or explicitly clear metrics_sample_interval_ms.
Sourcepub fn set_metrics_sample_interval_ms_mut(
&mut self,
value: Option<u64>,
) -> &mut Self
pub fn set_metrics_sample_interval_ms_mut( &mut self, value: Option<u64>, ) -> &mut Self
Set or explicitly clear metrics_sample_interval_ms.
Mutates this patch in place and returns it for chaining.
Sourcepub fn metrics_sample_interval_ms(self, value: u64) -> Self
pub fn metrics_sample_interval_ms(self, value: u64) -> Self
Set the metrics_sample_interval_ms field in this patch.
Sourcepub fn metrics_sample_interval_ms_mut(&mut self, value: u64) -> &mut Self
pub fn metrics_sample_interval_ms_mut(&mut self, value: u64) -> &mut Self
Set the metrics_sample_interval_ms field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn disable_metrics_sample(self, value: bool) -> Self
pub fn disable_metrics_sample(self, value: bool) -> Self
Set the disable_metrics_sample field in this patch.
Sourcepub fn disable_metrics_sample_mut(&mut self, value: bool) -> &mut Self
pub fn disable_metrics_sample_mut(&mut self, value: bool) -> &mut Self
Set the disable_metrics_sample field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn replace_scripts(self, value: BTreeMap<String, String>) -> Self
pub fn replace_scripts(self, value: BTreeMap<String, String>) -> Self
Replace the complete scripts field.
Sourcepub fn replace_scripts_mut(
&mut self,
value: BTreeMap<String, String>,
) -> &mut Self
pub fn replace_scripts_mut( &mut self, value: BTreeMap<String, String>, ) -> &mut Self
Replace the complete scripts field.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_workdir(self) -> Self
pub fn clear_workdir(self) -> Self
Remove workdir from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_workdir_mut(&mut self) -> &mut Self
pub fn clear_workdir_mut(&mut self) -> &mut Self
Remove workdir from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_shell(self) -> Self
pub fn clear_shell(self) -> Self
Remove shell from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_shell_mut(&mut self) -> &mut Self
pub fn clear_shell_mut(&mut self) -> &mut Self
Remove shell from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_scripts(self) -> Self
pub fn clear_scripts(self) -> Self
Remove scripts from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_scripts_mut(&mut self) -> &mut Self
pub fn clear_scripts_mut(&mut self) -> &mut Self
Remove scripts from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_entrypoint(self) -> Self
pub fn clear_entrypoint(self) -> Self
Remove entrypoint from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_entrypoint_mut(&mut self) -> &mut Self
pub fn clear_entrypoint_mut(&mut self) -> &mut Self
Remove entrypoint from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_cmd(self) -> Self
pub fn clear_cmd(self) -> Self
Remove cmd from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_cmd_mut(&mut self) -> &mut Self
pub fn clear_cmd_mut(&mut self) -> &mut Self
Remove cmd from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_hostname(self) -> Self
pub fn clear_hostname(self) -> Self
Remove hostname from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_hostname_mut(&mut self) -> &mut Self
pub fn clear_hostname_mut(&mut self) -> &mut Self
Remove hostname from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_user(self) -> Self
pub fn clear_user(self) -> Self
Remove user from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_user_mut(&mut self) -> &mut Self
pub fn clear_user_mut(&mut self) -> &mut Self
Remove user from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_log_level(self) -> Self
pub fn clear_log_level(self) -> Self
Remove log_level from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_log_level_mut(&mut self) -> &mut Self
pub fn clear_log_level_mut(&mut self) -> &mut Self
Remove log_level from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_metrics_sample_interval_ms(self) -> Self
pub fn clear_metrics_sample_interval_ms(self) -> Self
Remove metrics_sample_interval_ms from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_metrics_sample_interval_ms_mut(&mut self) -> &mut Self
pub fn clear_metrics_sample_interval_ms_mut(&mut self) -> &mut Self
Remove metrics_sample_interval_ms from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_disable_metrics_sample(self) -> Self
pub fn clear_disable_metrics_sample(self) -> Self
Remove disable_metrics_sample from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_disable_metrics_sample_mut(&mut self) -> &mut Self
pub fn clear_disable_metrics_sample_mut(&mut self) -> &mut Self
Remove disable_metrics_sample from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn get_scripts_mut(&mut self) -> &mut BTreeMap<String, String>
pub fn get_scripts_mut(&mut self) -> &mut BTreeMap<String, String>
Borrow the pending scripts 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 SandboxRuntimeOptions)
pub fn apply_to(self, target: &mut SandboxRuntimeOptions)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> SandboxRuntimeOptions
pub fn into_config(self) -> SandboxRuntimeOptions
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: SandboxRuntimeOptions) -> Self
pub fn from_present_fields(value: SandboxRuntimeOptions) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.