#[non_exhaustive]pub struct Metadata {
pub document_splitter: bool,
pub document_allow_multiple_labels: bool,
pub prefixed_naming_on_properties: bool,
pub skip_naming_validation: bool,
/* private fields */
}Expand description
Metadata for global schema behavior.
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.document_splitter: boolIf true, a document entity type can be applied to subdocument
(splitting). Otherwise, it can only be applied to the entire document
(classification).
document_allow_multiple_labels: boolIf true, on a given page, there can be multiple document annotations
covering it.
prefixed_naming_on_properties: boolIf set, all the nested entities must be prefixed with the parents.
skip_naming_validation: boolIf set, we will skip the naming format validation in the schema. So the
string values in DocumentSchema.EntityType.name and
DocumentSchema.EntityType.Property.name will not be checked.
Implementations§
Source§impl Metadata
impl Metadata
pub fn new() -> Self
Sourcepub fn set_document_splitter<T: Into<bool>>(self, v: T) -> Self
pub fn set_document_splitter<T: Into<bool>>(self, v: T) -> Self
Sets the value of document_splitter.
Sourcepub fn set_document_allow_multiple_labels<T: Into<bool>>(self, v: T) -> Self
pub fn set_document_allow_multiple_labels<T: Into<bool>>(self, v: T) -> Self
Sets the value of document_allow_multiple_labels.
Sourcepub fn set_prefixed_naming_on_properties<T: Into<bool>>(self, v: T) -> Self
pub fn set_prefixed_naming_on_properties<T: Into<bool>>(self, v: T) -> Self
Sets the value of prefixed_naming_on_properties.
Sourcepub fn set_skip_naming_validation<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_naming_validation<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_naming_validation.
Trait Implementations§
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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