pub trait Policies:
Debug
+ Send
+ Sync {
// Provided methods
fn list_policies(
&self,
_req: ListPoliciesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<ListPoliciesResponse>> + Send { ... }
fn get_policy(
&self,
_req: GetPolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Policy>> + Send { ... }
fn create_policy(
&self,
_req: CreatePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send { ... }
fn update_policy(
&self,
_req: UpdatePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send { ... }
fn delete_policy(
&self,
_req: DeletePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send { ... }
fn get_operation(
&self,
_req: GetOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send { ... }
fn get_polling_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingPolicy> { ... }
fn get_polling_backoff_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingBackoffPolicy> { ... }
}Expand description
Defines the trait used to implement crate::client::Policies.
Application developers may need to implement this trait to mock
client::Policies. In other use-cases, application developers only
use client::Policies 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 list_policies(
&self,
_req: ListPoliciesRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<ListPoliciesResponse>> + Send
fn list_policies( &self, _req: ListPoliciesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<ListPoliciesResponse>> + Send
Implements crate::client::Policies::list_policies.
Sourcefn get_policy(
&self,
_req: GetPolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Policy>> + Send
fn get_policy( &self, _req: GetPolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Policy>> + Send
Implements crate::client::Policies::get_policy.
Sourcefn create_policy(
&self,
_req: CreatePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send
fn create_policy( &self, _req: CreatePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send
Implements crate::client::Policies::create_policy.
Sourcefn update_policy(
&self,
_req: UpdatePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send
fn update_policy( &self, _req: UpdatePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send
Implements crate::client::Policies::update_policy.
Sourcefn delete_policy(
&self,
_req: DeletePolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send
fn delete_policy( &self, _req: DeletePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send
Implements crate::client::Policies::delete_policy.
Sourcefn get_operation(
&self,
_req: GetOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Operation>> + Send
fn get_operation( &self, _req: GetOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send
Implements crate::client::Policies::get_operation.
Sourcefn get_polling_policy(
&self,
_options: &RequestOptions,
) -> Arc<dyn PollingPolicy>
fn get_polling_policy( &self, _options: &RequestOptions, ) -> Arc<dyn PollingPolicy>
Returns the polling 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.