Struct docker_api::api::exec::Exec
source · pub struct Exec { /* private fields */ }
Expand description
Interface for docker exec instance
Implementations§
source§impl Exec
impl Exec
sourcepub async fn inspect(&self) -> Result<ExecInspect200Response>
pub async fn inspect(&self) -> Result<ExecInspect200Response>
Inspect this Exec.
sourcepub async fn create<C>(
docker: Docker,
container_id: C,
opts: &ExecCreateOpts
) -> Result<Exec>where
C: AsRef<str>,
pub async fn create<C>( docker: Docker, container_id: C, opts: &ExecCreateOpts ) -> Result<Exec>where C: AsRef<str>,
Creates a new exec instance that will be executed in a container with id == container_id.
sourcepub fn get(docker: Docker, id: impl Into<Id>) -> Exec
pub fn get(docker: Docker, id: impl Into<Id>) -> Exec
Get a reference to a set of operations available to an already created exec instance.
It’s in callers responsibility to ensure that exec instance with specified id actually exists. Use Exec::create to ensure that the exec instance is created beforehand.
sourcepub fn start(&self) -> impl Stream<Item = Result<TtyChunk>> + '_
pub fn start(&self) -> impl Stream<Item = Result<TtyChunk>> + '_
Starts this exec instance returning a multiplexed tty stream.
sourcepub async fn resize(&self, opts: &ExecResizeOpts) -> Result<()>
pub async fn resize(&self, opts: &ExecResizeOpts) -> Result<()>
Resize the TTY session used by an exec instance. This only works if the exec was created
with tty
enabled.