Trait Policies

Source
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§

Source

fn list_policies( &self, _req: ListPoliciesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<ListPoliciesResponse>> + Send

Source

fn get_policy( &self, _req: GetPolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Policy>> + Send

Source

fn create_policy( &self, _req: CreatePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send

Source

fn update_policy( &self, _req: UpdatePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send

Source

fn delete_policy( &self, _req: DeletePolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send

Source

fn get_operation( &self, _req: GetOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Operation>> + Send

Source

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.

Source

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.

Implementors§