1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use serde_json::json;
use crate::model::*;
use crate::RenderClient;
#[derive(Clone)]
pub struct RetrieveDeployRequest<'a> {
pub(crate) http_client: &'a RenderClient,
pub deploy_id: String,
pub service_id: String,
}
impl<'a> RetrieveDeployRequest<'a> {
pub async fn send(self) -> ::httpclient::InMemoryResult<serde_json::Value> {
let mut r = self
.http_client
.client
.get(
&format!(
"/services/{service_id}/deploys/{deploy_id}", deploy_id = self
.deploy_id, service_id = self.service_id
),
);
r = self.http_client.authenticate(r);
let res = r.send_awaiting_body().await?;
res.json()
}
}
impl<'a> ::std::future::IntoFuture for RetrieveDeployRequest<'a> {
type Output = httpclient::InMemoryResult<serde_json::Value>;
type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.send())
}
}