Skip to main content

SandboxRuntimeOptionsPatch

Struct SandboxRuntimeOptionsPatch 

Source
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

Source

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

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

Source

pub fn new() -> Self

Create an empty patch that leaves every target field unchanged.

Source

pub fn set_workdir(self, value: Option<String>) -> Self

Set or explicitly clear workdir.

Source

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.

Source

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

Set the workdir field in this patch.

Source

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.

Source

pub fn set_shell(self, value: Option<String>) -> Self

Set or explicitly clear shell.

Source

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.

Source

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

Set the shell field in this patch.

Source

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.

Source

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

Merge value into the scripts field.

Source

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.

Source

pub fn entrypoint(self, value: Vec<String>) -> Self

Set the entrypoint field in this patch.

Source

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.

Source

pub fn cmd(self, value: Vec<String>) -> Self

Set the cmd field in this patch.

Source

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.

Source

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

Set the hostname field in this patch.

Source

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.

Source

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

Set the user field in this patch.

Source

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.

Source

pub fn set_log_level(self, value: Option<SandboxLogLevel>) -> Self

Set or explicitly clear log_level.

Source

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.

Source

pub fn log_level(self, value: SandboxLogLevel) -> Self

Set the log_level field in this patch.

Source

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.

Source

pub fn set_metrics_sample_interval_ms(self, value: Option<u64>) -> Self

Set or explicitly clear metrics_sample_interval_ms.

Source

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.

Source

pub fn metrics_sample_interval_ms(self, value: u64) -> Self

Set the metrics_sample_interval_ms field in this patch.

Source

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.

Source

pub fn disable_metrics_sample(self, value: bool) -> Self

Set the disable_metrics_sample field in this patch.

Source

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.

Source

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

Replace the complete scripts field.

Source

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.

Source

pub fn clear_workdir(self) -> Self

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

Source

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.

Source

pub fn clear_shell(self) -> Self

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

Source

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.

Source

pub fn clear_scripts(self) -> Self

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

Source

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.

Source

pub fn clear_entrypoint(self) -> Self

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

Source

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.

Source

pub fn clear_cmd(self) -> Self

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

Source

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.

Source

pub fn clear_hostname(self) -> Self

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

Source

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.

Source

pub fn clear_user(self) -> Self

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

Source

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.

Source

pub fn clear_log_level(self) -> Self

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

Source

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.

Source

pub fn clear_metrics_sample_interval_ms(self) -> Self

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

Source

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.

Source

pub fn clear_disable_metrics_sample(self) -> Self

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

Source

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.

Source

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.

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 SandboxRuntimeOptions)

Apply every present field to an existing value.

Source

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.

Source

pub fn from_present_fields(value: SandboxRuntimeOptions) -> Self

Convert non-null fields into a changeset, treating Option::None as absent.

Trait Implementations§

Source§

impl Clone for SandboxRuntimeOptionsPatch

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 SandboxRuntimeOptionsPatch

Source§

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

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

impl Default for SandboxRuntimeOptionsPatch

Source§

fn default() -> Self

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

impl From<SandboxRuntimeOptions> for SandboxRuntimeOptionsPatch

Source§

fn from(value: SandboxRuntimeOptions) -> 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.