pub trait ServiceUsage:
Debug
+ Send
+ Sync {
// Provided methods
fn enable_service(
&self,
_req: EnableServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send { ... }
fn disable_service(
&self,
_req: DisableServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send { ... }
fn get_service(
&self,
_req: GetServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Service>>> + Send { ... }
fn list_services(
&self,
_req: ListServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ListServicesResponse>>> + Send { ... }
fn batch_enable_services(
&self,
_req: BatchEnableServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send { ... }
fn batch_get_services(
&self,
_req: BatchGetServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<BatchGetServicesResponse>>> + Send { ... }
fn list_operations(
&self,
_req: ListOperationsRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send { ... }
fn get_operation(
&self,
_req: GetOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send { ... }
fn get_polling_error_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingErrorPolicy> { ... }
fn get_polling_backoff_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingBackoffPolicy> { ... }
}
Expand description
Defines the trait used to implement super::client::ServiceUsage.
Application developers may need to implement this trait to mock
client::ServiceUsage
. In other use-cases, application developers only
use client::ServiceUsage
and need not be concerned with this trait or
its implementations.
Services gain new RPCs routinely. Consequently, this trait gains new methods too. To avoid breaking applications the trait provides a default implementation of each method. Most of these implementations just return an error.
Provided Methods§
Sourcefn enable_service(
&self,
_req: EnableServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send
fn enable_service( &self, _req: EnableServiceRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send
Implements super::client::ServiceUsage::enable_service.
Sourcefn disable_service(
&self,
_req: DisableServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send
fn disable_service( &self, _req: DisableServiceRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send
Implements super::client::ServiceUsage::disable_service.
Sourcefn get_service(
&self,
_req: GetServiceRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Service>>> + Send
fn get_service( &self, _req: GetServiceRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Service>>> + Send
Implements super::client::ServiceUsage::get_service.
Sourcefn list_services(
&self,
_req: ListServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ListServicesResponse>>> + Send
fn list_services( &self, _req: ListServicesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListServicesResponse>>> + Send
Implements super::client::ServiceUsage::list_services.
Sourcefn batch_enable_services(
&self,
_req: BatchEnableServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send
fn batch_enable_services( &self, _req: BatchEnableServicesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send
Sourcefn batch_get_services(
&self,
_req: BatchGetServicesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<BatchGetServicesResponse>>> + Send
fn batch_get_services( &self, _req: BatchGetServicesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<BatchGetServicesResponse>>> + Send
Implements super::client::ServiceUsage::batch_get_services.
Sourcefn list_operations(
&self,
_req: ListOperationsRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send
fn list_operations( &self, _req: ListOperationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send
Implements super::client::ServiceUsage::list_operations.
Sourcefn get_operation(
&self,
_req: GetOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send
fn get_operation( &self, _req: GetOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send
Implements super::client::ServiceUsage::get_operation.
Sourcefn get_polling_error_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingErrorPolicy>
fn get_polling_error_policy( &self, _options: &RequestOptions, ) -> Arc<dyn PollingErrorPolicy>
Returns the polling error policy.
When mocking, this method is typically irrelevant. Do not try to verify it is called by your mocks.
Sourcefn get_polling_backoff_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingBackoffPolicy>
fn get_polling_backoff_policy( &self, _options: &RequestOptions, ) -> Arc<dyn PollingBackoffPolicy>
Returns the polling backoff policy.
When mocking, this method is typically irrelevant. Do not try to verify it is called by your mocks.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.