ControlService

Trait ControlService 

Source
pub trait ControlService:
    Debug
    + Send
    + Sync {
    // Provided methods
    fn create_control(
        &self,
        _req: CreateControlRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Control>>> + Send { ... }
    fn delete_control(
        &self,
        _req: DeleteControlRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<()>>> + Send { ... }
    fn update_control(
        &self,
        _req: UpdateControlRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Control>>> + Send { ... }
    fn get_control(
        &self,
        _req: GetControlRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Control>>> + Send { ... }
    fn list_controls(
        &self,
        _req: ListControlsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListControlsResponse>>> + 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 cancel_operation(
        &self,
        _req: CancelOperationRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<()>>> + Send { ... }
}
Available on crate feature control-service only.
Expand description

Defines the trait used to implement super::client::ControlService.

Application developers may need to implement this trait to mock client::ControlService. In other use-cases, application developers only use client::ControlService 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 create_control( &self, _req: CreateControlRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Control>>> + Send

Source

fn delete_control( &self, _req: DeleteControlRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

Source

fn update_control( &self, _req: UpdateControlRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Control>>> + Send

Source

fn get_control( &self, _req: GetControlRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Control>>> + Send

Source

fn list_controls( &self, _req: ListControlsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListControlsResponse>>> + Send

Source

fn list_operations( &self, _req: ListOperationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send

Source

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

Source

fn cancel_operation( &self, _req: CancelOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

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§