[][src]Trait gitlab::api::endpoint_prelude::Client

pub trait Client {
    type Error: Error + Send + Sync + 'static;
    fn rest_endpoint(
        &self,
        endpoint: &str
    ) -> Result<Url, ApiError<Self::Error>>;
fn rest(
        &self,
        request: RequestBuilder,
        body: Vec<u8>
    ) -> Result<Response<Bytes>, ApiError<Self::Error>>; }

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

Associated Types

type Error: Error + Send + Sync + 'static

The errors which may occur for this client.

Loading content...

Required methods

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

Get the URL for the endpoint for the client.

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

fn rest(
    &self,
    request: RequestBuilder,
    body: Vec<u8>
) -> Result<Response<Bytes>, ApiError<Self::Error>>

Send a REST query.

Loading content...

Implementors

impl Client for Gitlab[src]

type Error = RestError

Loading content...