[][src]Struct bandsocks::ContainerBuilder

pub struct ContainerBuilder { /* fields omitted */ }

Setup for containers, starting at Container::new() and ending with ContainerBuilder::spawn()

Implementations

impl ContainerBuilder[src]

pub async fn run(self) -> Result<ExitStatus, RuntimeError>[src]

Start a new Container using these settings, and wait for it to exit, returning its exit status

This is equivalent to calling spawn() first and then Container::wait().

pub async fn output(self) -> Result<Output, RuntimeError>[src]

Start a new Container using these settings, and wait for it to exit, returning its output

This is equivalent to calling spawn() first and then Container::output().

pub async fn interact(self) -> Result<ExitStatus, RuntimeError>[src]

Start a new Container using these settings, and wait for it to exit with its stdio streams connected.

This is equivalent to calling spawn() first and then Container::interact().

pub fn spawn(self) -> Result<Container, RuntimeError>[src]

Start a new Container using the settings in this builder

pub fn mount<P, T>(self, path: P, mount: &T) -> Self where
    P: AsRef<Path>,
    T: Mount
[src]

Mount an overlay on the container's filesystem

Mount objects can write to the container's filesystem metadata at startup, leaving static files and/or live communications channels.

pub fn stdin(self, stream: SharedStream) -> Self[src]

Attach stdin to a specific shared stream

pub fn stdout(self, stream: SharedStream) -> Self[src]

Attach stdout to a specific shared stream

pub fn stderr(self, stream: SharedStream) -> Self[src]

Attach stderr to a specific shared stream

pub fn args<I, S>(self, args: I) -> Self where
    I: IntoIterator<Item = S>,
    S: AsRef<OsStr>, 
[src]

Append arguments to the container's command line

pub fn arg<S>(self, arg: S) -> Self where
    S: AsRef<OsStr>, 
[src]

Append one argument to the container's command line

pub fn working_dir<P>(self, dir: P) -> Self where
    P: AsRef<Path>, 
[src]

Override the working directory the entrypoint will start in

pub fn entrypoint<I, S>(self, args: I) -> Self where
    I: IntoIterator<Item = S>,
    S: AsRef<OsStr>, 
[src]

Override the container's entrypoint

The entrypoint, if present, is prepended to the "args" to form the container's full command line.

pub fn env<K, V>(self, key: K, val: V) -> Self where
    K: AsRef<OsStr>,
    V: AsRef<OsStr>, 
[src]

Add or replace one environment variable

pub fn envs<I, K, V>(self, vars: I) -> Self where
    I: IntoIterator<Item = (K, V)>,
    K: AsRef<OsStr>,
    V: AsRef<OsStr>, 
[src]

Add or replace many environment variables

pub fn env_remove<K: AsRef<OsStr>>(self, key: K) -> Self[src]

Remove one environment variable entirely, leaving it unset

pub fn env_clear(self) -> Self[src]

Clear all environment variables, including those from the image configuration

Trait Implementations

impl Clone for ContainerBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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