pub struct DetectDocumentText { /* private fields */ }
Expand description
Fluent builder constructing a request to DetectDocumentText
.
Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be an image in JPEG, PNG, PDF, or TIFF format. DetectDocumentText
returns the detected text in an array of Block
objects.
Each document page has as an associated Block
of type PAGE. Each PAGE Block
object is the parent of LINE Block
objects that represent the lines of detected text on a page. A LINE Block
object is a parent for each word that makes up the line. Words are represented by Block
objects of type WORD.
DetectDocumentText
is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection
.
For more information, see Document Text Detection.
Implementations§
source§impl DetectDocumentText
impl DetectDocumentText
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<DetectDocumentText, AwsResponseRetryClassifier>, SdkError<DetectDocumentTextError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<DetectDocumentText, AwsResponseRetryClassifier>, SdkError<DetectDocumentTextError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<DetectDocumentTextOutput, SdkError<DetectDocumentTextError>>
pub async fn send(
self
) -> Result<DetectDocumentTextOutput, SdkError<DetectDocumentTextError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn document(self, input: Document) -> Self
pub fn document(self, input: Document) -> Self
The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPEG or PNG format.
If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the Bytes
field.
sourcepub fn set_document(self, input: Option<Document>) -> Self
pub fn set_document(self, input: Option<Document>) -> Self
The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPEG or PNG format.
If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the Bytes
field.
Trait Implementations§
source§impl Clone for DetectDocumentText
impl Clone for DetectDocumentText
source§fn clone(&self) -> DetectDocumentText
fn clone(&self) -> DetectDocumentText
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more