Struct aws_sdk_translate::types::Document
source · #[non_exhaustive]pub struct Document {
pub content: Blob,
pub content_type: String,
}Expand description
The content and content type of a document.
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.content: BlobThe Contentfield type is Binary large object (blob). This object contains the document content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding on this field before sending the request.
content_type: StringDescribes the format of the document. You can specify one of the following:
-
text/html- The input data consists of HTML content. Amazon Translate translates only the text in the HTML element. -
text/plain- The input data consists of unformatted text. Amazon Translate translates every character in the content. -
application/vnd.openxmlformats-officedocument.wordprocessingml.document- The input data consists of a Word document (.docx).
Implementations§
source§impl Document
impl Document
sourcepub fn content(&self) -> &Blob
pub fn content(&self) -> &Blob
The Contentfield type is Binary large object (blob). This object contains the document content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding on this field before sending the request.
sourcepub fn content_type(&self) -> &str
pub fn content_type(&self) -> &str
Describes the format of the document. You can specify one of the following:
-
text/html- The input data consists of HTML content. Amazon Translate translates only the text in the HTML element. -
text/plain- The input data consists of unformatted text. Amazon Translate translates every character in the content. -
application/vnd.openxmlformats-officedocument.wordprocessingml.document- The input data consists of a Word document (.docx).
Trait Implementations§
source§impl PartialEq for Document
impl PartialEq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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