#[non_exhaustive]pub struct Page {Show 17 fields
pub page_number: i32,
pub image: Option<Image>,
pub transforms: Vec<Matrix>,
pub dimension: Option<Dimension>,
pub layout: Option<Layout>,
pub detected_languages: Vec<DetectedLanguage>,
pub blocks: Vec<Block>,
pub paragraphs: Vec<Paragraph>,
pub lines: Vec<Line>,
pub tokens: Vec<Token>,
pub visual_elements: Vec<VisualElement>,
pub tables: Vec<Table>,
pub form_fields: Vec<FormField>,
pub symbols: Vec<Symbol>,
pub detected_barcodes: Vec<DetectedBarcode>,
pub image_quality_scores: Option<ImageQualityScores>,
pub provenance: Option<Provenance>,
/* private fields */
}Expand description
A page in 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.page_number: i321-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
image: Option<Image>Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
transforms: Vec<Matrix>Transformation matrices that were applied to the original document image to produce Page.image.
dimension: Option<Dimension>Physical dimension of the page.
layout: Option<Layout>Layout for the page.
detected_languages: Vec<DetectedLanguage>A list of detected languages together with confidence.
blocks: Vec<Block>A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
paragraphs: Vec<Paragraph>A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
lines: Vec<Line>A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
tokens: Vec<Token>A list of visually detected tokens on the page.
visual_elements: Vec<VisualElement>A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
tables: Vec<Table>A list of visually detected tables on the page.
form_fields: Vec<FormField>A list of visually detected form fields on the page.
symbols: Vec<Symbol>A list of visually detected symbols on the page.
detected_barcodes: Vec<DetectedBarcode>A list of detected barcodes.
image_quality_scores: Option<ImageQualityScores>Image quality scores.
provenance: Option<Provenance>The history of this page.
Implementations§
Source§impl Page
impl Page
pub fn new() -> Self
Sourcepub fn set_page_number<T: Into<i32>>(self, v: T) -> Self
pub fn set_page_number<T: Into<i32>>(self, v: T) -> Self
Sets the value of page_number.
Sourcepub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
Sets or clears the value of image.
Sourcepub fn set_transforms<T, V>(self, v: T) -> Self
pub fn set_transforms<T, V>(self, v: T) -> Self
Sets the value of transforms.
Sourcepub fn set_dimension<T>(self, v: T) -> Self
pub fn set_dimension<T>(self, v: T) -> Self
Sets the value of dimension.
Sourcepub fn set_or_clear_dimension<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dimension<T>(self, v: Option<T>) -> Self
Sets or clears the value of dimension.
Sourcepub fn set_layout<T>(self, v: T) -> Self
pub fn set_layout<T>(self, v: T) -> Self
Sets the value of layout.
Sourcepub fn set_or_clear_layout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_layout<T>(self, v: Option<T>) -> Self
Sets or clears the value of layout.
Sourcepub fn set_detected_languages<T, V>(self, v: T) -> Self
pub fn set_detected_languages<T, V>(self, v: T) -> Self
Sets the value of detected_languages.
Sourcepub fn set_blocks<T, V>(self, v: T) -> Self
pub fn set_blocks<T, V>(self, v: T) -> Self
Sets the value of blocks.
Sourcepub fn set_paragraphs<T, V>(self, v: T) -> Self
pub fn set_paragraphs<T, V>(self, v: T) -> Self
Sets the value of paragraphs.
Sourcepub fn set_tokens<T, V>(self, v: T) -> Self
pub fn set_tokens<T, V>(self, v: T) -> Self
Sets the value of tokens.
Sourcepub fn set_visual_elements<T, V>(self, v: T) -> Self
pub fn set_visual_elements<T, V>(self, v: T) -> Self
Sets the value of visual_elements.
Sourcepub fn set_tables<T, V>(self, v: T) -> Self
pub fn set_tables<T, V>(self, v: T) -> Self
Sets the value of tables.
Sourcepub fn set_form_fields<T, V>(self, v: T) -> Self
pub fn set_form_fields<T, V>(self, v: T) -> Self
Sets the value of form_fields.
Sourcepub fn set_symbols<T, V>(self, v: T) -> Self
pub fn set_symbols<T, V>(self, v: T) -> Self
Sets the value of symbols.
Sourcepub fn set_detected_barcodes<T, V>(self, v: T) -> Self
pub fn set_detected_barcodes<T, V>(self, v: T) -> Self
Sets the value of detected_barcodes.
Sourcepub fn set_image_quality_scores<T>(self, v: T) -> Selfwhere
T: Into<ImageQualityScores>,
pub fn set_image_quality_scores<T>(self, v: T) -> Selfwhere
T: Into<ImageQualityScores>,
Sets the value of image_quality_scores.
Sourcepub fn set_or_clear_image_quality_scores<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImageQualityScores>,
pub fn set_or_clear_image_quality_scores<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImageQualityScores>,
Sets or clears the value of image_quality_scores.
Sourcepub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
👎Deprecated
pub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
Sets the value of provenance.
Sourcepub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
👎Deprecated
pub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
Sets or clears the value of provenance.