pub struct ContainerRunSpec<'a> {
pub engine: &'a str,
pub image: &'a str,
pub workdir: &'a str,
pub network: bool,
pub mounts: &'a [String],
pub name: &'a str,
}Expand description
Parameters for creating a long-lived, exec-able container.
Fields§
§engine: &'a strThe engine binary to invoke (e.g. "docker", "podman", "nerdctl").
image: &'a strContainer image, e.g. "ubuntu:24.04".
workdir: &'a strAbsolute host workdir; bind-mounted at the same path and set as the container’s working directory.
network: boolWhether the container has network access (false → --network none).
mounts: &'a [String]Extra host paths to bind-mount (each mounted at its own path).
name: &'a strContainer name, used later for exec and rm.
Trait Implementations§
Source§impl<'a> Clone for ContainerRunSpec<'a>
impl<'a> Clone for ContainerRunSpec<'a>
Source§fn clone(&self) -> ContainerRunSpec<'a>
fn clone(&self) -> ContainerRunSpec<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ContainerRunSpec<'a>
impl<'a> RefUnwindSafe for ContainerRunSpec<'a>
impl<'a> Send for ContainerRunSpec<'a>
impl<'a> Sync for ContainerRunSpec<'a>
impl<'a> Unpin for ContainerRunSpec<'a>
impl<'a> UnsafeUnpin for ContainerRunSpec<'a>
impl<'a> UnwindSafe for ContainerRunSpec<'a>
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