Trait ModelService

Source
pub trait ModelService:
    Debug
    + Send
    + Sync {
Show 31 methods // Provided methods fn upload_model( &self, _req: UploadModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn get_model( &self, _req: GetModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Model>>> + Send { ... } fn list_models( &self, _req: ListModelsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListModelsResponse>>> + Send { ... } fn list_model_versions( &self, _req: ListModelVersionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListModelVersionsResponse>>> + Send { ... } fn list_model_version_checkpoints( &self, _req: ListModelVersionCheckpointsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListModelVersionCheckpointsResponse>>> + Send { ... } fn update_model( &self, _req: UpdateModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Model>>> + Send { ... } fn update_explanation_dataset( &self, _req: UpdateExplanationDatasetRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn delete_model( &self, _req: DeleteModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn delete_model_version( &self, _req: DeleteModelVersionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn merge_version_aliases( &self, _req: MergeVersionAliasesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Model>>> + Send { ... } fn export_model( &self, _req: ExportModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn copy_model( &self, _req: CopyModelRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... } fn import_model_evaluation( &self, _req: ImportModelEvaluationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ModelEvaluation>>> + Send { ... } fn batch_import_model_evaluation_slices( &self, _req: BatchImportModelEvaluationSlicesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<BatchImportModelEvaluationSlicesResponse>>> + Send { ... } fn batch_import_evaluated_annotations( &self, _req: BatchImportEvaluatedAnnotationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<BatchImportEvaluatedAnnotationsResponse>>> + Send { ... } fn get_model_evaluation( &self, _req: GetModelEvaluationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ModelEvaluation>>> + Send { ... } fn list_model_evaluations( &self, _req: ListModelEvaluationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListModelEvaluationsResponse>>> + Send { ... } fn get_model_evaluation_slice( &self, _req: GetModelEvaluationSliceRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ModelEvaluationSlice>>> + Send { ... } fn list_model_evaluation_slices( &self, _req: ListModelEvaluationSlicesRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListModelEvaluationSlicesResponse>>> + Send { ... } fn list_locations( &self, _req: ListLocationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListLocationsResponse>>> + Send { ... } fn get_location( &self, _req: GetLocationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Location>>> + Send { ... } fn set_iam_policy( &self, _req: SetIamPolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Policy>>> + Send { ... } fn get_iam_policy( &self, _req: GetIamPolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Policy>>> + Send { ... } fn test_iam_permissions( &self, _req: TestIamPermissionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<TestIamPermissionsResponse>>> + 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 delete_operation( &self, _req: DeleteOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send { ... } fn cancel_operation( &self, _req: CancelOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send { ... } fn wait_operation( &self, _req: WaitOperationRequest, _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> { ... }
}
Available on crate feature model-service only.
Expand description

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

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn test_iam_permissions( &self, _req: TestIamPermissionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<TestIamPermissionsResponse>>> + 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 delete_operation( &self, _req: DeleteOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

Source

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

Source

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

Source

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.

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§