render_api/request/
list_env_groups.rs

1use serde_json::json;
2use crate::model::*;
3use crate::RenderClient;
4use httpclient::InMemoryResponseExt;
5/**Create this with the associated client method.
6
7That method takes required values as arguments. Set optional values using builder methods on this struct.*/
8#[derive(Clone)]
9pub struct ListEnvGroupsRequest<'a> {
10    pub(crate) http_client: &'a RenderClient,
11}
12impl<'a> ListEnvGroupsRequest<'a> {
13    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<EnvGroupCursor>> {
14        let mut r = self.http_client.client.get("/env-groups");
15        r = self.http_client.authenticate(r);
16        let res = r.await?;
17        res.json().map_err(Into::into)
18    }
19}
20impl<'a> ::std::future::IntoFuture for ListEnvGroupsRequest<'a> {
21    type Output = httpclient::InMemoryResult<Vec<EnvGroupCursor>>;
22    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
23    fn into_future(self) -> Self::IntoFuture {
24        Box::pin(self.send())
25    }
26}