pub struct ContainerOptsBuilder { /* private fields */ }

Implementations

Set the name of the container.

enable all exposed ports on the container to be mapped to random, available, ports on the host

Publish a port in the container without assigning a port on the host

Specify the working dir (corresponds to the -w docker cli argument)

Specify a Vec of string values to customize labels for MLS systems, such as SELinux.

Specify any bind mounts, taking the form of /some/host/path:/some/container/path

Total memory limit (memory + swap) in bytes. Set to -1 (default) to enable unlimited swap.

CPU quota in units of 10-9 CPUs. Set to 0 (default) for there to be no limit.

For example, setting nano_cpus to 500_000_000 results in the container being allocated 50% of a single CPU, while 2_000_000_000 results in the container being allocated 2 CPUs.

CPU quota in units of CPUs. This is a wrapper around nano_cpus to do the unit conversion.

See nano_cpus.

Sets an integer value representing the container’s relative CPU weight versus other containers.

Whether to attach to stdin.

Whether to attach to stdout.

Whether to attach to stderr.

Whether standard streams should be attached to a TTY.

Signal to stop a container as a string. Default is "SIGTERM"

Signal to stop a container as an integer. Default is 15 (SIGTERM).

Timeout to stop a container. Only seconds are counted. Default is 10s

Trait Implementations

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more