Struct docker_ctl::Configurator

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

Configuration of the container

Implementations§

source§

impl Configurator

source

pub fn create(self) -> Container

Create the container

source

pub fn set_command( self, command: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Set the command for the docker

source

pub fn set_capture_stdio(self, capture: bool) -> Self

Capture stdin/err/out

source

pub fn set_interactive(self, interactive: bool) -> Self

Set the docker in interactive mode.

source

pub fn set_tty(self, tty: bool) -> Self

Set the docker in TTY mode.

source

pub fn set_privilged(self, priviliged: bool) -> Self

Enable/disable priviliged (see docker documentation).

source

pub fn set_x11_forwarding(self, x11_forwarding: bool) -> Self

Forward X11 to the container

source

pub fn set_network(self, network: Network) -> Self

Set the network mode

source

pub fn mount( self, host_dir: impl Into<String>, container_dir: impl Into<String>, ) -> Self

Mount a drive from the host to the container

source

pub fn set_username(self, username: impl Into<String>) -> Self

Set the username in the container, this is required for X11 forwarding

source

pub fn set_env_variable( self, name: impl Into<String>, variable: impl Into<String>, ) -> Self

Set an environment variable

source

pub fn set_clean_up(self, clean_up: bool) -> Self

Set if the container should be cleaned up after execution (set –rm)

source

pub fn set_name(self, name: impl Into<String>) -> Self

set the name of the container

source

pub fn generate_name(self, prefix: impl Into<String>) -> Self

generate a name with the given prefix

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V