podman_client/images/
tree.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::images::tree::{ImageTree, ImageTreeOptions},
10    },
11};
12
13impl Client {
14    pub async fn image_tree(&self, options: ImageTreeOptions<'_>) -> Result<ImageTree, Error> {
15        let (_, data) = self
16            .send_request::<_, (), _>(SendRequestOptions {
17                method: "GET",
18                path: &["/libpod/images/", options.name, "/tree"].concat(),
19                header: None,
20                body: Empty::<Bytes>::new(),
21            })
22            .await?;
23
24        Ok(data)
25    }
26}