Struct googapis::google::cloud::translation::v3::translation_service_client::TranslationServiceClient [−][src]
pub struct TranslationServiceClient<T> { /* fields omitted */ }
Expand description
Provides natural language translation operations.
Implementations
impl<T> TranslationServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> TranslationServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> TranslationServiceClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn translate_text(
&mut self,
request: impl IntoRequest<TranslateTextRequest>
) -> Result<Response<TranslateTextResponse>, Status>
pub async fn translate_text(
&mut self,
request: impl IntoRequest<TranslateTextRequest>
) -> Result<Response<TranslateTextResponse>, Status>
Translates input text and returns translated text.
pub async fn detect_language(
&mut self,
request: impl IntoRequest<DetectLanguageRequest>
) -> Result<Response<DetectLanguageResponse>, Status>
pub async fn detect_language(
&mut self,
request: impl IntoRequest<DetectLanguageRequest>
) -> Result<Response<DetectLanguageResponse>, Status>
Detects the language of text within a request.
pub async fn get_supported_languages(
&mut self,
request: impl IntoRequest<GetSupportedLanguagesRequest>
) -> Result<Response<SupportedLanguages>, Status>
pub async fn get_supported_languages(
&mut self,
request: impl IntoRequest<GetSupportedLanguagesRequest>
) -> Result<Response<SupportedLanguages>, Status>
Returns a list of supported languages for translation.
pub async fn translate_document(
&mut self,
request: impl IntoRequest<TranslateDocumentRequest>
) -> Result<Response<TranslateDocumentResponse>, Status>
pub async fn translate_document(
&mut self,
request: impl IntoRequest<TranslateDocumentRequest>
) -> Result<Response<TranslateDocumentResponse>, Status>
Translates documents in synchronous mode.
pub async fn batch_translate_text(
&mut self,
request: impl IntoRequest<BatchTranslateTextRequest>
) -> Result<Response<Operation>, Status>
pub async fn batch_translate_text(
&mut self,
request: impl IntoRequest<BatchTranslateTextRequest>
) -> Result<Response<Operation>, Status>
Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it’s all or nothing) may still be available on the specified output location.
This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.
pub async fn batch_translate_document(
&mut self,
request: impl IntoRequest<BatchTranslateDocumentRequest>
) -> Result<Response<Operation>, Status>
pub async fn batch_translate_document(
&mut self,
request: impl IntoRequest<BatchTranslateDocumentRequest>
) -> Result<Response<Operation>, Status>
Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it’s all or nothing) may still be available on the specified output location.
This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.
pub async fn create_glossary(
&mut self,
request: impl IntoRequest<CreateGlossaryRequest>
) -> Result<Response<Operation>, Status>
pub async fn create_glossary(
&mut self,
request: impl IntoRequest<CreateGlossaryRequest>
) -> Result<Response<Operation>, Status>
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn’t exist.
pub async fn list_glossaries(
&mut self,
request: impl IntoRequest<ListGlossariesRequest>
) -> Result<Response<ListGlossariesResponse>, Status>
pub async fn list_glossaries(
&mut self,
request: impl IntoRequest<ListGlossariesRequest>
) -> Result<Response<ListGlossariesResponse>, Status>
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn’t exist.
pub async fn get_glossary(
&mut self,
request: impl IntoRequest<GetGlossaryRequest>
) -> Result<Response<Glossary>, Status>
pub async fn get_glossary(
&mut self,
request: impl IntoRequest<GetGlossaryRequest>
) -> Result<Response<Glossary>, Status>
Gets a glossary. Returns NOT_FOUND, if the glossary doesn’t exist.
pub async fn delete_glossary(
&mut self,
request: impl IntoRequest<DeleteGlossaryRequest>
) -> Result<Response<Operation>, Status>
pub async fn delete_glossary(
&mut self,
request: impl IntoRequest<DeleteGlossaryRequest>
) -> Result<Response<Operation>, Status>
Deletes a glossary, or cancels glossary construction if the glossary isn’t created yet. Returns NOT_FOUND, if the glossary doesn’t exist.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for TranslationServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for TranslationServiceClient<T> where
T: Send,
impl<T> Sync for TranslationServiceClient<T> where
T: Sync,
impl<T> Unpin for TranslationServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for TranslationServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more