Struct google_translate2::api::TranslateTextRequest[][src]

pub struct TranslateTextRequest {
    pub format: Option<String>,
    pub model: Option<String>,
    pub q: Option<Vec<String>>,
    pub source: Option<String>,
    pub target: Option<String>,
}

The main translation request message for the Cloud Translation API.

Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields

format: Option<String>

The format of the source text, in either HTML (default) or plain-text. A value of "html" indicates HTML and a value of "text" indicates plain-text.

model: Option<String>

The model type requested for this translation. Valid values are listed in public documentation.

q: Option<Vec<String>>

The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs.

source: Option<String>

The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to identify the source language automatically and return it within the response.

target: Option<String>

The language to use for translation of the input text, set to one of the language codes listed in Language Support.

Trait Implementations

impl Clone for TranslateTextRequest[src]

impl Debug for TranslateTextRequest[src]

impl Default for TranslateTextRequest[src]

impl<'de> Deserialize<'de> for TranslateTextRequest[src]

impl RequestValue for TranslateTextRequest[src]

impl Serialize for TranslateTextRequest[src]

Auto Trait Implementations

impl RefUnwindSafe for TranslateTextRequest[src]

impl Send for TranslateTextRequest[src]

impl Sync for TranslateTextRequest[src]

impl Unpin for TranslateTextRequest[src]

impl UnwindSafe for TranslateTextRequest[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.