Struct docker_ctl::Configurator
source · pub struct Configurator { /* private fields */ }Expand description
Configuration of the container
Implementations§
source§impl Configurator
impl Configurator
sourcepub fn set_command(
self,
command: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn set_command( self, command: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Set the command for the docker
sourcepub fn set_capture_stdio(self, capture: bool) -> Self
pub fn set_capture_stdio(self, capture: bool) -> Self
Capture stdin/err/out
sourcepub fn set_interactive(self, interactive: bool) -> Self
pub fn set_interactive(self, interactive: bool) -> Self
Set the docker in interactive mode.
sourcepub fn set_privilged(self, priviliged: bool) -> Self
pub fn set_privilged(self, priviliged: bool) -> Self
Enable/disable priviliged (see docker documentation).
sourcepub fn set_x11_forwarding(self, x11_forwarding: bool) -> Self
pub fn set_x11_forwarding(self, x11_forwarding: bool) -> Self
Forward X11 to the container
sourcepub fn set_network(self, network: Network) -> Self
pub fn set_network(self, network: Network) -> Self
Set the network mode
sourcepub fn mount(
self,
host_dir: impl Into<String>,
container_dir: impl Into<String>,
) -> Self
pub fn mount( self, host_dir: impl Into<String>, container_dir: impl Into<String>, ) -> Self
Mount a drive from the host to the container
sourcepub fn set_username(self, username: impl Into<String>) -> Self
pub fn set_username(self, username: impl Into<String>) -> Self
Set the username in the container, this is required for X11 forwarding
sourcepub fn set_env_variable(
self,
name: impl Into<String>,
variable: impl Into<String>,
) -> Self
pub fn set_env_variable( self, name: impl Into<String>, variable: impl Into<String>, ) -> Self
Set an environment variable
sourcepub fn set_clean_up(self, clean_up: bool) -> Self
pub fn set_clean_up(self, clean_up: bool) -> Self
Set if the container should be cleaned up after execution (set –rm)
sourcepub fn generate_name(self, prefix: impl Into<String>) -> Self
pub fn generate_name(self, prefix: impl Into<String>) -> Self
generate a name with the given prefix
Auto Trait Implementations§
impl Freeze for Configurator
impl RefUnwindSafe for Configurator
impl Send for Configurator
impl Sync for Configurator
impl Unpin for Configurator
impl UnwindSafe for Configurator
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