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