#[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
Sourcepub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::Matrix;
let x = Page::new()
.set_transforms([
Matrix::default()/* use setters */,
Matrix::default()/* use (different) setters */,
]);Sourcepub fn set_dimension<T>(self, v: T) -> Self
pub fn set_dimension<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_dimension<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dimension<T>(self, v: Option<T>) -> Self
Sourcepub fn set_layout<T>(self, v: T) -> Self
pub fn set_layout<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_layout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_layout<T>(self, v: Option<T>) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedLanguage;
let x = Page::new()
.set_detected_languages([
DetectedLanguage::default()/* use setters */,
DetectedLanguage::default()/* use (different) setters */,
]);Sourcepub fn set_blocks<T, V>(self, v: T) -> Self
pub fn set_blocks<T, V>(self, v: T) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::Paragraph;
let x = Page::new()
.set_paragraphs([
Paragraph::default()/* use setters */,
Paragraph::default()/* use (different) setters */,
]);Sourcepub fn set_tokens<T, V>(self, v: T) -> Self
pub fn set_tokens<T, V>(self, v: T) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::VisualElement;
let x = Page::new()
.set_visual_elements([
VisualElement::default()/* use setters */,
VisualElement::default()/* use (different) setters */,
]);Sourcepub fn set_tables<T, V>(self, v: T) -> Self
pub fn set_tables<T, V>(self, v: T) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::FormField;
let x = Page::new()
.set_form_fields([
FormField::default()/* use setters */,
FormField::default()/* use (different) setters */,
]);Sourcepub fn set_symbols<T, V>(self, v: T) -> Self
pub fn set_symbols<T, V>(self, v: T) -> Self
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.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedBarcode;
let x = Page::new()
.set_detected_barcodes([
DetectedBarcode::default()/* use setters */,
DetectedBarcode::default()/* use (different) setters */,
]);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.
§Example
use google_cloud_documentai_v1::model::document::page::ImageQualityScores;
let x = Page::new().set_image_quality_scores(ImageQualityScores::default()/* use setters */);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.
§Example
use google_cloud_documentai_v1::model::document::page::ImageQualityScores;
let x = Page::new().set_or_clear_image_quality_scores(Some(ImageQualityScores::default()/* use setters */));
let x = Page::new().set_or_clear_image_quality_scores(None::<ImageQualityScores>);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.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = Page::new().set_provenance(Provenance::default()/* use setters */);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.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = Page::new().set_or_clear_provenance(Some(Provenance::default()/* use setters */));
let x = Page::new().set_or_clear_provenance(None::<Provenance>);