Trait openstack_sdk::api::RestClient
source · 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§
Required Methods§
sourcefn rest_endpoint(
&self,
service_type: &ServiceType,
endpoint: &str
) -> Result<Url, ApiError<Self::Error>>
fn rest_endpoint( &self, service_type: &ServiceType, endpoint: &str ) -> Result<Url, ApiError<Self::Error>>
Get the URL of the service endpoint.
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
) -> Result<ServiceEndpoint, ApiError<Self::Error>>
fn get_service_endpoint( &self, service_type: &ServiceType ) -> Result<ServiceEndpoint, ApiError<Self::Error>>
Get service endpoint information