Struct oci_spec::runtime::ProcessBuilder

source ·
pub struct ProcessBuilder { /* private fields */ }
Expand description

Builder for Process.

Implementations§

source§

impl ProcessBuilder

source

pub fn terminal<VALUE: Into<bool>>(self, value: VALUE) -> Self

Terminal creates an interactive terminal for the container.

source

pub fn console_size<VALUE: Into<Box>>(self, value: VALUE) -> Self

ConsoleSize specifies the size of the console.

source

pub fn user<VALUE: Into<User>>(self, value: VALUE) -> Self

User specifies user information for the process.

source

pub fn args<VALUE: Into<Vec<String>>>(self, value: VALUE) -> Self

Args specifies the binary and arguments for the application to execute.

source

pub fn command_line<VALUE: Into<String>>(self, value: VALUE) -> Self

CommandLine specifies the full command line for the application to execute on Windows.

source

pub fn env<VALUE: Into<Vec<String>>>(self, value: VALUE) -> Self

Env populates the process environment for the process.

source

pub fn cwd<VALUE: Into<PathBuf>>(self, value: VALUE) -> Self

Cwd is the current working directory for the process and must be relative to the container’s root.

source

pub fn capabilities<VALUE: Into<LinuxCapabilities>>(self, value: VALUE) -> Self

Capabilities are Linux capabilities that are kept for the process.

source

pub fn rlimits<VALUE: Into<Vec<PosixRlimit>>>(self, value: VALUE) -> Self

Rlimits specifies rlimit options to apply to the process.

source

pub fn no_new_privileges<VALUE: Into<bool>>(self, value: VALUE) -> Self

NoNewPrivileges controls whether additional privileges could be gained by processes in the container.

source

pub fn apparmor_profile<VALUE: Into<String>>(self, value: VALUE) -> Self

ApparmorProfile specifies the apparmor profile for the container.

source

pub fn oom_score_adj<VALUE: Into<i32>>(self, value: VALUE) -> Self

Specify an oom_score_adj for the container.

source

pub fn selinux_label<VALUE: Into<String>>(self, value: VALUE) -> Self

SelinuxLabel specifies the selinux context that the container process is run as.

source

pub fn io_priority<VALUE: Into<LinuxIOPriority>>(self, value: VALUE) -> Self

IOPriority contains the I/O priority settings for the cgroup.

source

pub fn scheduler<VALUE: Into<Scheduler>>(self, value: VALUE) -> Self

Scheduler specifies the scheduling attributes for a process

source

pub fn exec_cpu_affinity<VALUE: Into<ExecCPUAffinity>>( self, value: VALUE, ) -> Self

ExecCPUAffinity specifies the cpu affinity for a process

source

pub fn build(self) -> Result<Process, OciSpecError>

Builds a new Process.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl Default for ProcessBuilder

source§

fn default() -> Self

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

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> 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, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.