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