pve/nodes/node/ceph/osd/osdid/
out.rs1#[derive(Debug, Clone)]
2pub struct OutClient<T> {
3 client: T,
4 path: String,
5}
6
7impl<T> OutClient<T>
8where
9 T: Clone,
10{
11 pub fn new(client: T, parent_path: &str) -> Self {
12 Self {
13 client,
14 path: format!("{}/{}", parent_path, "out"),
15 }
16 }
17}
18impl<T> OutClient<T>
19where
20 T: crate::client::HttpClient,
21{
22 #[doc = "ceph osd out"]
23 pub fn post(&self) -> Result<(), T::Error> {
24 self.client.post(&self.path, &())
25 }
26}
27#[derive(Debug, Clone)]
28pub struct AsyncOutClient<T> {
29 client: T,
30 path: String,
31}
32
33impl<T> AsyncOutClient<T>
34where
35 T: Clone,
36{
37 pub fn new(client: T, parent_path: &str) -> Self {
38 Self {
39 client,
40 path: format!("{}/{}", parent_path, "out"),
41 }
42 }
43}
44impl<T> AsyncOutClient<T>
45where
46 T: crate::client::AsyncHttpClient,
47{
48 #[doc = "ceph osd out"]
49 pub async fn post(&self) -> Result<(), T::Error> {
50 self.client.post(&self.path, &()).await
51 }
52}