[][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 build_rest(&self, method: Method, url: Url) -> RequestBuilder;
fn rest(
        &self,
        request: RequestBuilder
    ) -> Result<Response, 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 build_rest(&self, method: Method, url: Url) -> RequestBuilder

Build a REST query from a URL and a given method.

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

Send a REST query.

Loading content...

Implementors

impl Client for Gitlab[src]

type Error = RestError

Loading content...