Struct aws_sdk_translate::input::TranslateTextInput
source · [−]#[non_exhaustive]pub struct TranslateTextInput {
pub text: Option<String>,
pub terminology_names: Option<Vec<String>>,
pub source_language_code: Option<String>,
pub target_language_code: Option<String>,
pub settings: Option<TranslationSettings>,
}Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: Option<String>The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
terminology_names: Option<Vec<String>>The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText request. Terminology lists can contain a maximum of 256 terms.
source_language_code: Option<String>The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.
To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.
target_language_code: Option<String>The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
settings: Option<TranslationSettings>Settings to configure your translation output, including the option to mask profane words and phrases.
Implementations
sourceimpl TranslateTextInput
impl TranslateTextInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<TranslateText, AwsErrorRetryPolicy>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<TranslateText, AwsErrorRetryPolicy>, BuildError>
Consumes the builder and constructs an Operation<TranslateText>
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture TranslateTextInput
sourceimpl TranslateTextInput
impl TranslateTextInput
sourcepub fn text(&self) -> Option<&str>
pub fn text(&self) -> Option<&str>
The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
sourcepub fn terminology_names(&self) -> Option<&[String]>
pub fn terminology_names(&self) -> Option<&[String]>
The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText request. Terminology lists can contain a maximum of 256 terms.
sourcepub fn source_language_code(&self) -> Option<&str>
pub fn source_language_code(&self) -> Option<&str>
The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.
To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.
sourcepub fn target_language_code(&self) -> Option<&str>
pub fn target_language_code(&self) -> Option<&str>
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
sourcepub fn settings(&self) -> Option<&TranslationSettings>
pub fn settings(&self) -> Option<&TranslationSettings>
Settings to configure your translation output, including the option to mask profane words and phrases.
Trait Implementations
sourceimpl Clone for TranslateTextInput
impl Clone for TranslateTextInput
sourcefn clone(&self) -> TranslateTextInput
fn clone(&self) -> TranslateTextInput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for TranslateTextInput
impl Debug for TranslateTextInput
sourceimpl PartialEq<TranslateTextInput> for TranslateTextInput
impl PartialEq<TranslateTextInput> for TranslateTextInput
sourcefn eq(&self, other: &TranslateTextInput) -> bool
fn eq(&self, other: &TranslateTextInput) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &TranslateTextInput) -> bool
fn ne(&self, other: &TranslateTextInput) -> bool
This method tests for !=.
impl StructuralPartialEq for TranslateTextInput
Auto Trait Implementations
impl RefUnwindSafe for TranslateTextInput
impl Send for TranslateTextInput
impl Sync for TranslateTextInput
impl Unpin for TranslateTextInput
impl UnwindSafe for TranslateTextInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more