#[non_exhaustive]pub struct TranslateDocumentOutput {
pub translated_document: Option<TranslatedDocument>,
pub source_language_code: String,
pub target_language_code: String,
pub applied_terminologies: Option<Vec<AppliedTerminology>>,
pub applied_settings: Option<TranslationSettings>,
/* private fields */
}
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.translated_document: Option<TranslatedDocument>
The document containing the translated content. The document format matches the source document format.
source_language_code: String
The language code of the source document.
target_language_code: String
The language code of the translated document.
applied_terminologies: Option<Vec<AppliedTerminology>>
The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document.
applied_settings: Option<TranslationSettings>
Settings to configure your translation output. You can configure the following options:
-
Brevity: reduces the length of the translation output for most translations. Available for
TranslateText
only. -
Formality: sets the formality level of the translation output.
-
Profanity: masks profane words and phrases in the translation output.
Implementations§
source§impl TranslateDocumentOutput
impl TranslateDocumentOutput
sourcepub fn translated_document(&self) -> Option<&TranslatedDocument>
pub fn translated_document(&self) -> Option<&TranslatedDocument>
The document containing the translated content. The document format matches the source document format.
sourcepub fn source_language_code(&self) -> &str
pub fn source_language_code(&self) -> &str
The language code of the source document.
sourcepub fn target_language_code(&self) -> &str
pub fn target_language_code(&self) -> &str
The language code of the translated document.
sourcepub fn applied_terminologies(&self) -> &[AppliedTerminology]
pub fn applied_terminologies(&self) -> &[AppliedTerminology]
The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .applied_terminologies.is_none()
.
sourcepub fn applied_settings(&self) -> Option<&TranslationSettings>
pub fn applied_settings(&self) -> Option<&TranslationSettings>
Settings to configure your translation output. You can configure the following options:
-
Brevity: reduces the length of the translation output for most translations. Available for
TranslateText
only. -
Formality: sets the formality level of the translation output.
-
Profanity: masks profane words and phrases in the translation output.
source§impl TranslateDocumentOutput
impl TranslateDocumentOutput
sourcepub fn builder() -> TranslateDocumentOutputBuilder
pub fn builder() -> TranslateDocumentOutputBuilder
Creates a new builder-style object to manufacture TranslateDocumentOutput
.
Trait Implementations§
source§impl Clone for TranslateDocumentOutput
impl Clone for TranslateDocumentOutput
source§fn clone(&self) -> TranslateDocumentOutput
fn clone(&self) -> TranslateDocumentOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TranslateDocumentOutput
impl Debug for TranslateDocumentOutput
source§impl PartialEq for TranslateDocumentOutput
impl PartialEq for TranslateDocumentOutput
source§fn eq(&self, other: &TranslateDocumentOutput) -> bool
fn eq(&self, other: &TranslateDocumentOutput) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RequestId for TranslateDocumentOutput
impl RequestId for TranslateDocumentOutput
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.impl StructuralPartialEq for TranslateDocumentOutput
Auto Trait Implementations§
impl Freeze for TranslateDocumentOutput
impl RefUnwindSafe for TranslateDocumentOutput
impl Send for TranslateDocumentOutput
impl Sync for TranslateDocumentOutput
impl Unpin for TranslateDocumentOutput
impl UnwindSafe for TranslateDocumentOutput
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more