pub struct TenantContainerBuilder { /* private fields */ }Expand description
Builder that can be used to configure the properties of a process that will join an existing container sandbox
Implementations§
Source§impl TenantContainerBuilder
impl TenantContainerBuilder
Sourcepub fn with_env(self, env: HashMap<String, String>) -> Self
pub fn with_env(self, env: HashMap<String, String>) -> Self
Sets environment variables for the container
Sourcepub fn with_cwd<P: Into<PathBuf>>(self, path: Option<P>) -> Self
pub fn with_cwd<P: Into<PathBuf>>(self, path: Option<P>) -> Self
Sets the working directory of the container
Sourcepub fn with_container_args(self, args: Vec<String>) -> Self
pub fn with_container_args(self, args: Vec<String>) -> Self
Sets the command the container will be started with
pub fn with_no_new_privs(self, no_new_privs: bool) -> Self
pub fn with_capabilities(self, capabilities: Vec<String>) -> Self
pub fn with_process<P: Into<PathBuf>>(self, path: Option<P>) -> Self
Sourcepub fn as_sibling(self, as_sibling: bool) -> Self
pub fn as_sibling(self, as_sibling: bool) -> Self
Sets if the init process should be run as a child or a sibling of the calling process
pub fn with_detach(self, detached: bool) -> Self
pub fn with_additional_gids(self, gids: Vec<u32>) -> Self
pub fn with_user(self, user: Option<u32>) -> Self
pub fn with_group(self, group: Option<u32>) -> Self
pub fn with_ignore_paused(self, ignore_paused: bool) -> Self
pub fn with_sub_cgroup(self, sub_cgroup: Option<String>) -> Self
pub fn with_process_label(self, process_label: Option<String>) -> Self
pub fn with_apparmor(self, apparmor: Option<String>) -> Self
Sourcepub fn build(self) -> Result<Pid, LibcontainerError>
pub fn build(self) -> Result<Pid, LibcontainerError>
Joins an existing container
Auto Trait Implementations§
impl Freeze for TenantContainerBuilder
impl !RefUnwindSafe for TenantContainerBuilder
impl !Send for TenantContainerBuilder
impl !Sync for TenantContainerBuilder
impl Unpin for TenantContainerBuilder
impl UnsafeUnpin for TenantContainerBuilder
impl !UnwindSafe for TenantContainerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more