Trait gitlab::api::AsyncClient[][src]

pub trait AsyncClient {
    type Error: Error + Send + Sync + 'static;
    fn rest_endpoint(
        &self,
        endpoint: &str
    ) -> Result<Url, ApiError<Self::Error>>;
#[must_use] fn rest_async<'life0, 'async_trait>(
        &'life0 self,
        request: RequestBuilder,
        body: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ApiError<Self::Error>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

A trait representing an asynchronous client which can communicate with a GitLab instance.

Associated Types

type Error: Error + Send + Sync + 'static[src]

The errors which may occur for this client.

Required methods

fn rest_endpoint(&self, endpoint: &str) -> Result<Url, ApiError<Self::Error>>[src]

Get the URL for the endpoint for the client.

This method adds the hostname for the client’s target instance.

#[must_use]
fn rest_async<'life0, 'async_trait>(
    &'life0 self,
    request: RequestBuilder,
    body: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ApiError<Self::Error>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send a REST query asynchronously.

Implementors

impl AsyncClient for AsyncGitlab[src]

type Error = RestError

fn rest_endpoint(&self, endpoint: &str) -> Result<Url, ApiError<Self::Error>>[src]

fn rest_async<'life0, 'async_trait>(
    &'life0 self,
    request: Builder,
    body: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<HttpResponse<Bytes>, ApiError<Self::Error>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]