Struct aws_sdk_comprehend::types::Block
source · #[non_exhaustive]pub struct Block {
pub id: Option<String>,
pub block_type: Option<BlockType>,
pub text: Option<String>,
pub page: Option<i32>,
pub geometry: Option<Geometry>,
pub relationships: Option<Vec<RelationshipsListItem>>,
}
Expand description
Information about each word or line of text in the input document.
For additional information, see Block in the Amazon Textract API reference.
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.id: Option<String>
Unique identifier for the block.
block_type: Option<BlockType>
The block represents a line of text or one word of text.
-
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
-
LINE - A string of tab-delimited, contiguous words that are detected on a document page
text: Option<String>
The word or line of text extracted from the block.
page: Option<i32>
Page number where the block appears.
geometry: Option<Geometry>
Co-ordinates of the rectangle or polygon that contains the text.
relationships: Option<Vec<RelationshipsListItem>>
A list of child blocks of the current block. For example, a LINE object has child blocks for each WORD block that's part of the line of text.
Implementations§
source§impl Block
impl Block
sourcepub fn block_type(&self) -> Option<&BlockType>
pub fn block_type(&self) -> Option<&BlockType>
The block represents a line of text or one word of text.
-
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
-
LINE - A string of tab-delimited, contiguous words that are detected on a document page
sourcepub fn geometry(&self) -> Option<&Geometry>
pub fn geometry(&self) -> Option<&Geometry>
Co-ordinates of the rectangle or polygon that contains the text.
sourcepub fn relationships(&self) -> &[RelationshipsListItem]
pub fn relationships(&self) -> &[RelationshipsListItem]
A list of child blocks of the current block. For example, a LINE object has child blocks for each WORD block that's part of the line of text.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .relationships.is_none()
.