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