pve/nodes/node/qemu/vmid/agent/
network_get_interfaces.rs1#[doc = "Returns an object with a single `result` property."]
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, Default)]
3pub struct GetResponseItem {}
4
5#[derive(Debug, Clone)]
6pub struct NetworkGetInterfacesClient<T> {
7 client: T,
8 path: String,
9}
10
11impl<T> NetworkGetInterfacesClient<T>
12where
13 T: Clone,
14{
15 pub fn new(client: T, parent_path: &str) -> Self {
16 Self {
17 client,
18 path: format!("{}/{}", parent_path, "network-get-interfaces"),
19 }
20 }
21}
22impl<T> NetworkGetInterfacesClient<T>
23where
24 T: crate::client::HttpClient,
25{
26 #[doc = "Execute network-get-interfaces."]
27 pub fn get(&self) -> Result<GetResponseItem, T::Error> {
28 self.client.get(&self.path, &())
29 }
30}
31#[derive(Debug, Clone)]
32pub struct AsyncNetworkGetInterfacesClient<T> {
33 client: T,
34 path: String,
35}
36
37impl<T> AsyncNetworkGetInterfacesClient<T>
38where
39 T: Clone,
40{
41 pub fn new(client: T, parent_path: &str) -> Self {
42 Self {
43 client,
44 path: format!("{}/{}", parent_path, "network-get-interfaces"),
45 }
46 }
47}
48impl<T> AsyncNetworkGetInterfacesClient<T>
49where
50 T: crate::client::AsyncHttpClient,
51{
52 #[doc = "Execute network-get-interfaces."]
53 pub async fn get(&self) -> Result<GetResponseItem, T::Error> {
54 self.client.get(&self.path, &()).await
55 }
56}