podman_rest_client/v5/
client.rs

1use super::apis;
2use crate::api_common::config::HasConfig;
3pub trait Client:
4    HasConfig
5    + Send
6    + Sync
7    + apis::Containers
8    + apis::ContainersCompat
9    + apis::Exec
10    + apis::ExecCompat
11    + apis::Images
12    + apis::ImagesCompat
13    + apis::Manifests
14    + apis::Networks
15    + apis::NetworksCompat
16    + apis::Pods
17    + apis::Secrets
18    + apis::SecretsCompat
19    + apis::System
20    + apis::SystemCompat
21    + apis::Volumes
22    + apis::VolumesCompat
23{
24    /// Actions related to containers
25    fn containers(&self) -> &dyn apis::Containers;
26    /// Actions related to containers for the compatibility endpoints
27    fn containers_compat(&self) -> &dyn apis::ContainersCompat;
28    /// Actions related to exec
29    fn exec(&self) -> &dyn apis::Exec;
30    /// Actions related to exec for the compatibility endpoints
31    fn exec_compat(&self) -> &dyn apis::ExecCompat;
32    /// Actions related to images
33    fn images(&self) -> &dyn apis::Images;
34    /// Actions related to images for the compatibility endpoints
35    fn images_compat(&self) -> &dyn apis::ImagesCompat;
36    /// Actions related to manifests
37    fn manifests(&self) -> &dyn apis::Manifests;
38    /// Actions related to networks
39    fn networks(&self) -> &dyn apis::Networks;
40    /// Actions related to networks for the compatibility endpoints
41    fn networks_compat(&self) -> &dyn apis::NetworksCompat;
42    /// Actions related to pods
43    fn pods(&self) -> &dyn apis::Pods;
44    /// Actions related to secrets
45    fn secrets(&self) -> &dyn apis::Secrets;
46    /// Actions related to secrets for the compatibility endpoints
47    fn secrets_compat(&self) -> &dyn apis::SecretsCompat;
48    /// Actions related to Podman engine
49    fn system(&self) -> &dyn apis::System;
50    /// Actions related to Podman and compatibility engines
51    fn system_compat(&self) -> &dyn apis::SystemCompat;
52    /// Actions related to volumes
53    fn volumes(&self) -> &dyn apis::Volumes;
54    /// Actions related to volumes for the compatibility endpoints
55    fn volumes_compat(&self) -> &dyn apis::VolumesCompat;
56}
57#[macro_export]
58macro_rules! impl_crate_v5_traits {
59    ($struct_name:ident) => {
60        impl crate::v5::Client for $struct_name {
61            #[doc = " Actions related to containers"]
62            fn containers(&self) -> &dyn crate::v5::apis::Containers {
63                self
64            }
65            #[doc = " Actions related to containers for the compatibility endpoints"]
66            fn containers_compat(&self) -> &dyn crate::v5::apis::ContainersCompat {
67                self
68            }
69            #[doc = " Actions related to exec"]
70            fn exec(&self) -> &dyn crate::v5::apis::Exec {
71                self
72            }
73            #[doc = " Actions related to exec for the compatibility endpoints"]
74            fn exec_compat(&self) -> &dyn crate::v5::apis::ExecCompat {
75                self
76            }
77            #[doc = " Actions related to images"]
78            fn images(&self) -> &dyn crate::v5::apis::Images {
79                self
80            }
81            #[doc = " Actions related to images for the compatibility endpoints"]
82            fn images_compat(&self) -> &dyn crate::v5::apis::ImagesCompat {
83                self
84            }
85            #[doc = " Actions related to manifests"]
86            fn manifests(&self) -> &dyn crate::v5::apis::Manifests {
87                self
88            }
89            #[doc = " Actions related to networks"]
90            fn networks(&self) -> &dyn crate::v5::apis::Networks {
91                self
92            }
93            #[doc = " Actions related to networks for the compatibility endpoints"]
94            fn networks_compat(&self) -> &dyn crate::v5::apis::NetworksCompat {
95                self
96            }
97            #[doc = " Actions related to pods"]
98            fn pods(&self) -> &dyn crate::v5::apis::Pods {
99                self
100            }
101            #[doc = " Actions related to secrets"]
102            fn secrets(&self) -> &dyn crate::v5::apis::Secrets {
103                self
104            }
105            #[doc = " Actions related to secrets for the compatibility endpoints"]
106            fn secrets_compat(&self) -> &dyn crate::v5::apis::SecretsCompat {
107                self
108            }
109            #[doc = " Actions related to Podman engine"]
110            fn system(&self) -> &dyn crate::v5::apis::System {
111                self
112            }
113            #[doc = " Actions related to Podman and compatibility engines"]
114            fn system_compat(&self) -> &dyn crate::v5::apis::SystemCompat {
115                self
116            }
117            #[doc = " Actions related to volumes"]
118            fn volumes(&self) -> &dyn crate::v5::apis::Volumes {
119                self
120            }
121            #[doc = " Actions related to volumes for the compatibility endpoints"]
122            fn volumes_compat(&self) -> &dyn crate::v5::apis::VolumesCompat {
123                self
124            }
125        }
126        impl crate::v5::apis::Containers for $struct_name {}
127        impl crate::v5::apis::ContainersCompat for $struct_name {}
128        impl crate::v5::apis::Exec for $struct_name {}
129        impl crate::v5::apis::ExecCompat for $struct_name {}
130        impl crate::v5::apis::Images for $struct_name {}
131        impl crate::v5::apis::ImagesCompat for $struct_name {}
132        impl crate::v5::apis::Manifests for $struct_name {}
133        impl crate::v5::apis::Networks for $struct_name {}
134        impl crate::v5::apis::NetworksCompat for $struct_name {}
135        impl crate::v5::apis::Pods for $struct_name {}
136        impl crate::v5::apis::Secrets for $struct_name {}
137        impl crate::v5::apis::SecretsCompat for $struct_name {}
138        impl crate::v5::apis::System for $struct_name {}
139        impl crate::v5::apis::SystemCompat for $struct_name {}
140        impl crate::v5::apis::Volumes for $struct_name {}
141        impl crate::v5::apis::VolumesCompat for $struct_name {}
142    };
143}