#[non_exhaustive]pub struct LayoutParsingConfig {
pub enable_table_annotation: bool,
pub enable_image_annotation: bool,
pub structured_content_types: Vec<String>,
pub exclude_html_elements: Vec<String>,
pub exclude_html_classes: Vec<String>,
pub exclude_html_ids: Vec<String>,
/* private fields */
}Available on crate feature
data-store-service only.Expand description
The layout parsing configurations for documents.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_table_annotation: boolOptional. If true, the LLM based annotation is added to the table during parsing.
enable_image_annotation: boolOptional. If true, the LLM based annotation is added to the image during parsing.
structured_content_types: Vec<String>Optional. Contains the required structure types to extract from the document. Supported values:
shareholder-structure
exclude_html_elements: Vec<String>Optional. List of HTML elements to exclude from the parsed content.
exclude_html_classes: Vec<String>Optional. List of HTML classes to exclude from the parsed content.
exclude_html_ids: Vec<String>Optional. List of HTML ids to exclude from the parsed content.
Implementations§
Source§impl LayoutParsingConfig
impl LayoutParsingConfig
pub fn new() -> Self
Sourcepub fn set_enable_table_annotation<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_table_annotation<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_table_annotation.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_enable_table_annotation(true);Sourcepub fn set_enable_image_annotation<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_image_annotation<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_image_annotation.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_enable_image_annotation(true);Sourcepub fn set_structured_content_types<T, V>(self, v: T) -> Self
pub fn set_structured_content_types<T, V>(self, v: T) -> Self
Sets the value of structured_content_types.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_structured_content_types(["a", "b", "c"]);Sourcepub fn set_exclude_html_elements<T, V>(self, v: T) -> Self
pub fn set_exclude_html_elements<T, V>(self, v: T) -> Self
Sets the value of exclude_html_elements.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_exclude_html_elements(["a", "b", "c"]);Sourcepub fn set_exclude_html_classes<T, V>(self, v: T) -> Self
pub fn set_exclude_html_classes<T, V>(self, v: T) -> Self
Sets the value of exclude_html_classes.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_exclude_html_classes(["a", "b", "c"]);Sourcepub fn set_exclude_html_ids<T, V>(self, v: T) -> Self
pub fn set_exclude_html_ids<T, V>(self, v: T) -> Self
Sets the value of exclude_html_ids.
§Example
ⓘ
let x = LayoutParsingConfig::new().set_exclude_html_ids(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for LayoutParsingConfig
impl Clone for LayoutParsingConfig
Source§fn clone(&self) -> LayoutParsingConfig
fn clone(&self) -> LayoutParsingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutParsingConfig
impl Debug for LayoutParsingConfig
Source§impl Default for LayoutParsingConfig
impl Default for LayoutParsingConfig
Source§fn default() -> LayoutParsingConfig
fn default() -> LayoutParsingConfig
Returns the “default value” for a type. Read more
Source§impl Message for LayoutParsingConfig
impl Message for LayoutParsingConfig
Source§impl PartialEq for LayoutParsingConfig
impl PartialEq for LayoutParsingConfig
impl StructuralPartialEq for LayoutParsingConfig
Auto Trait Implementations§
impl Freeze for LayoutParsingConfig
impl RefUnwindSafe for LayoutParsingConfig
impl Send for LayoutParsingConfig
impl Sync for LayoutParsingConfig
impl Unpin for LayoutParsingConfig
impl UnwindSafe for LayoutParsingConfig
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
Mutably borrows from an owned value. Read more