pub async fn create(
        docker: &'docker Docker,
        container_id: &str,
        opts: &ExecContainerOptions,
    ) -> Result<Exec<'docker>> {
        #[derive(serde::Deserialize)]
        #[serde(rename_all = "PascalCase")]
        struct Response {
            id: String,
        }

        let body: Body = opts.serialize()?.into();

        let id = docker
            .post_json(
                &format!("/containers/{}/exec", container_id),
                Some((body, mime::APPLICATION_JSON)),
            )
            .await
            .map(|resp: Response| resp.id)?;

        Ok(Exec::new(docker, id))
    }
/// Creates a new exec instance that will be executed in a container with id == container_id
Creates a new exec instance that will be executed in a container with id == container_id
Creates a new exec instance that will be executed in a container with id == container_id
pub async fn create(
        docker: &'docker Docker,
        container_id: &str,
        opts: &ExecContainerOptions,
    ) -> Result<Exec<'docker>> {
        #[derive(serde::Deserialize)]
        #[serde(rename_all = "PascalCase")]
        struct Response {
            id: String,
        }
        let body: Body = opts.serialize()?.into();
        let id = docker
            .post_json(
                &format!("/containers/{}/exec", container_id),
                Some((body, mime::APPLICATION_JSON)),
            )
            .await
            .map(|resp: Response| resp.id)?;
        Ok(Exec::new(docker, id))
    }
pub async fn create ( docker : & ' docker Docker , container_id : & str , opts : & ExecContainerOptions , ) -> Result < Exec < ' docker > > { # [ derive ( serde Deserialize ) ] # [ serde ( rename_all " " ) ] struct Response { id : String , } let body : Body = opts . serialize ( ) ? . into ( ) ; let id = docker . post_json ( & format ! ( " " container_id ) , Some ( ( body , mime :: APPLICATION_JSON ) ) , ) . await . map ( | resp : Response | resp . id ) ? ; Ok ( Exec :: new ( docker , id ) ) }
Creates a new exec instance that will be executed in a container with id == container_id
Creates a new exec instance that will be executed in a container with id == container_id
docker
&'docker Docker
container_id
&str
opts
&ExecContainerOptions
docker
&'docker Docker
container_id
&str
opts
&ExecContainerOptions