podman_client/containers/
unmount.rs

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