Trait gitlab::api::RestClient

source ·
pub trait RestClient {
    type Error: Error + Send + Sync + 'static;

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

    // Provided method
    fn instance_endpoint(
        &self,
        endpoint: &str
    ) -> Result<Url, ApiError<Self::Error>> { ... }
}
Expand description

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

Required Associated Types§

source

type Error: Error + Send + Sync + 'static

The errors which may occur for this client.

Required Methods§

source

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

Get the URL for a REST v4 endpoint for the client.

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

Provided Methods§

source

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

Get the URL for an instance endpoint for the client.

Implementors§