podman_client/networks/
exists.rs

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