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()
.
Trait Implementations§
source§impl PartialEq for Block
impl PartialEq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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