#[non_exhaustive]pub struct ProcessOptions {
pub ocr_config: Option<OcrConfig>,
pub layout_config: Option<LayoutConfig>,
pub schema_override: Option<DocumentSchema>,
pub page_range: Option<PageRange>,
/* private fields */
}Expand description
Options for Process API
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.ocr_config: Option<OcrConfig>Only applicable to OCR_PROCESSOR and FORM_PARSER_PROCESSOR.
Returns error if set on other processor types.
layout_config: Option<LayoutConfig>Optional. Only applicable to LAYOUT_PARSER_PROCESSOR.
Returns error if set on other processor types.
schema_override: Option<DocumentSchema>Optional. Override the schema of the ProcessorVersion. Will return an Invalid Argument error if this field is set when the underlying ProcessorVersion doesn’t support schema override.
page_range: Option<PageRange>A subset of pages to process. If not specified, all pages are processed. If a page range is set, only the given pages are extracted and processed from the document. In the output document, Document.Page.page_number refers to the page number in the original document. This configuration only applies to online processing with ProcessDocument.
Implementations§
Source§impl ProcessOptions
impl ProcessOptions
pub fn new() -> Self
Sourcepub fn set_ocr_config<T>(self, v: T) -> Self
pub fn set_ocr_config<T>(self, v: T) -> Self
Sets the value of ocr_config.
Sourcepub fn set_or_clear_ocr_config<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ocr_config<T>(self, v: Option<T>) -> Self
Sets or clears the value of ocr_config.
Sourcepub fn set_layout_config<T>(self, v: T) -> Selfwhere
T: Into<LayoutConfig>,
pub fn set_layout_config<T>(self, v: T) -> Selfwhere
T: Into<LayoutConfig>,
Sets the value of layout_config.
Sourcepub fn set_or_clear_layout_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LayoutConfig>,
pub fn set_or_clear_layout_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LayoutConfig>,
Sets or clears the value of layout_config.
Sourcepub fn set_schema_override<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_schema_override<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
Sets the value of schema_override.
Sourcepub fn set_or_clear_schema_override<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_or_clear_schema_override<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
Sets or clears the value of schema_override.
Sourcepub fn set_page_range<T: Into<Option<PageRange>>>(self, v: T) -> Self
pub fn set_page_range<T: Into<Option<PageRange>>>(self, v: T) -> Self
Sets the value of page_range.
Note that all the setters affecting page_range are mutually
exclusive.
Sourcepub fn individual_page_selector(&self) -> Option<&Box<IndividualPageSelector>>
pub fn individual_page_selector(&self) -> Option<&Box<IndividualPageSelector>>
The value of page_range
if it holds a IndividualPageSelector, None if the field is not set or
holds a different branch.
Sourcepub fn set_individual_page_selector<T: Into<Box<IndividualPageSelector>>>(
self,
v: T,
) -> Self
pub fn set_individual_page_selector<T: Into<Box<IndividualPageSelector>>>( self, v: T, ) -> Self
Sets the value of page_range
to hold a IndividualPageSelector.
Note that all the setters affecting page_range are
mutually exclusive.
Sourcepub fn from_start(&self) -> Option<&i32>
pub fn from_start(&self) -> Option<&i32>
The value of page_range
if it holds a FromStart, None if the field is not set or
holds a different branch.
Sourcepub fn set_from_start<T: Into<i32>>(self, v: T) -> Self
pub fn set_from_start<T: Into<i32>>(self, v: T) -> Self
Sets the value of page_range
to hold a FromStart.
Note that all the setters affecting page_range are
mutually exclusive.
Sourcepub fn from_end(&self) -> Option<&i32>
pub fn from_end(&self) -> Option<&i32>
The value of page_range
if it holds a FromEnd, None if the field is not set or
holds a different branch.
Sourcepub fn set_from_end<T: Into<i32>>(self, v: T) -> Self
pub fn set_from_end<T: Into<i32>>(self, v: T) -> Self
Sets the value of page_range
to hold a FromEnd.
Note that all the setters affecting page_range are
mutually exclusive.
Trait Implementations§
Source§impl Clone for ProcessOptions
impl Clone for ProcessOptions
Source§fn clone(&self) -> ProcessOptions
fn clone(&self) -> ProcessOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more