podman_client/exec/
inspect.rs

1use http_body_util::Empty;
2use hyper::body::Bytes;
3
4use crate::{
5    client::Client,
6    models::{
7        connection::SendRequestOptions,
8        lib::Error,
9        podman::exec::inspect::{ExecInspect, ExecInspectOptions},
10    },
11};
12
13impl Client {
14    pub async fn exec_inspect(
15        &self,
16        options: ExecInspectOptions<'_>,
17    ) -> Result<ExecInspect, Error> {
18        let (_, data) = self
19            .send_request::<_, (), _>(SendRequestOptions {
20                method: "GET",
21                path: &["/libpod/exec/", options.id, "/json"].concat(),
22                header: None,
23                body: Empty::<Bytes>::new(),
24            })
25            .await?;
26
27        Ok(data)
28    }
29}