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

    // Required methods
    fn rest_endpoint(
        &self,
        service_type: &ServiceType,
        endpoint: &str
    ) -> Result<Url, ApiError<Self::Error>>;
    fn get_current_project(&self) -> Option<Project>;
    fn get_service_endpoint(
        &self,
        service_type: &ServiceType
    ) -> Result<ServiceEndpoint, ApiError<Self::Error>>;
}
Expand description

A trait representing a client which can communicate with a OpenStack service API via REST API.

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, service_type: &ServiceType, endpoint: &str ) -> Result<Url, ApiError<Self::Error>>

Get the URL of the service endpoint.

source

fn get_current_project(&self) -> Option<Project>

Get current token project information

source

fn get_service_endpoint( &self, service_type: &ServiceType ) -> Result<ServiceEndpoint, ApiError<Self::Error>>

Get service endpoint information

Implementors§