pub trait PredictionService:
Debug
+ Send
+ Sync {
Show 16 methods
// Provided methods
fn predict(
&self,
_req: PredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<PredictResponse>>> + Send { ... }
fn raw_predict(
&self,
_req: RawPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<HttpBody>>> + Send { ... }
fn direct_predict(
&self,
_req: DirectPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<DirectPredictResponse>>> + Send { ... }
fn direct_raw_predict(
&self,
_req: DirectRawPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<DirectRawPredictResponse>>> + Send { ... }
fn explain(
&self,
_req: ExplainRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ExplainResponse>>> + Send { ... }
fn generate_content(
&self,
_req: GenerateContentRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<GenerateContentResponse>>> + 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 { ... }
}prediction-service only.Expand description
Defines the trait used to implement super::client::PredictionService.
Application developers may need to implement this trait to mock
client::PredictionService. In other use-cases, application developers only
use client::PredictionService 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 predict(
&self,
_req: PredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<PredictResponse>>> + Send
fn predict( &self, _req: PredictRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<PredictResponse>>> + Send
Implements super::client::PredictionService::predict.
Sourcefn raw_predict(
&self,
_req: RawPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<HttpBody>>> + Send
fn raw_predict( &self, _req: RawPredictRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<HttpBody>>> + Send
Implements super::client::PredictionService::raw_predict.
Sourcefn direct_predict(
&self,
_req: DirectPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<DirectPredictResponse>>> + Send
fn direct_predict( &self, _req: DirectPredictRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<DirectPredictResponse>>> + Send
Implements super::client::PredictionService::direct_predict.
Sourcefn direct_raw_predict(
&self,
_req: DirectRawPredictRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<DirectRawPredictResponse>>> + Send
fn direct_raw_predict( &self, _req: DirectRawPredictRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<DirectRawPredictResponse>>> + Send
Sourcefn explain(
&self,
_req: ExplainRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ExplainResponse>>> + Send
fn explain( &self, _req: ExplainRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ExplainResponse>>> + Send
Implements super::client::PredictionService::explain.
Sourcefn generate_content(
&self,
_req: GenerateContentRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<GenerateContentResponse>>> + Send
fn generate_content( &self, _req: GenerateContentRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<GenerateContentResponse>>> + Send
Sourcefn list_locations(
&self,
_req: ListLocationsRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<ListLocationsResponse>>> + Send
fn list_locations( &self, _req: ListLocationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListLocationsResponse>>> + Send
Implements super::client::PredictionService::list_locations.
Sourcefn get_location(
&self,
_req: GetLocationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Location>>> + Send
fn get_location( &self, _req: GetLocationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Location>>> + Send
Implements super::client::PredictionService::get_location.
Sourcefn set_iam_policy(
&self,
_req: SetIamPolicyRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Policy>>> + Send
fn set_iam_policy( &self, _req: SetIamPolicyRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Policy>>> + Send
Implements super::client::PredictionService::set_iam_policy.
Sourcefn get_iam_policy(
&self,
_req: GetIamPolicyRequest,
_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
Implements super::client::PredictionService::get_iam_policy.
Sourcefn test_iam_permissions(
&self,
_req: TestIamPermissionsRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<TestIamPermissionsResponse>>> + Send
fn test_iam_permissions( &self, _req: TestIamPermissionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<TestIamPermissionsResponse>>> + Send
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
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::PredictionService::get_operation.
Sourcefn delete_operation(
&self,
_req: DeleteOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<()>>> + Send
fn delete_operation( &self, _req: DeleteOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send
Sourcefn cancel_operation(
&self,
_req: CancelOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<()>>> + Send
fn cancel_operation( &self, _req: CancelOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send
Sourcefn wait_operation(
&self,
_req: WaitOperationRequest,
_options: RequestOptions,
) -> impl Future<Output = Result<Response<Operation>>> + Send
fn wait_operation( &self, _req: WaitOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send
Implements super::client::PredictionService::wait_operation.
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.