pub trait RestClient {
type Error: Error + Send + Sync + 'static;
// Required methods
fn get_current_project(&self) -> Option<Project>;
fn get_service_endpoint(
&self,
service_type: &ServiceType,
version: Option<&ApiVersion>,
) -> 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§
Required Methods§
Sourcefn get_current_project(&self) -> Option<Project>
fn get_current_project(&self) -> Option<Project>
Get current token project information
Sourcefn get_service_endpoint(
&self,
service_type: &ServiceType,
version: Option<&ApiVersion>,
) -> Result<&ServiceEndpoint, ApiError<Self::Error>>
fn get_service_endpoint( &self, service_type: &ServiceType, version: Option<&ApiVersion>, ) -> Result<&ServiceEndpoint, ApiError<Self::Error>>
Get service endpoint information