#[non_exhaustive]pub struct DocumentSchema {
pub display_name: String,
pub description: String,
pub entity_types: Vec<EntityType>,
pub metadata: Option<Metadata>,
/* private fields */
}Expand description
The schema defines the output of the processed document by a processor.
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.display_name: StringDisplay name to show to users.
description: StringDescription of the schema.
entity_types: Vec<EntityType>Entity types of the schema.
metadata: Option<Metadata>Metadata of the schema.
Implementations§
Source§impl DocumentSchema
impl DocumentSchema
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_entity_types<T, V>(self, v: T) -> Self
pub fn set_entity_types<T, V>(self, v: T) -> Self
Sets the value of entity_types.
Sourcepub fn set_metadata<T>(self, v: T) -> Self
pub fn set_metadata<T>(self, v: T) -> Self
Sets the value of metadata.
Trait Implementations§
Source§impl Clone for DocumentSchema
impl Clone for DocumentSchema
Source§fn clone(&self) -> DocumentSchema
fn clone(&self) -> DocumentSchema
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 DocumentSchema
impl Debug for DocumentSchema
Source§impl Default for DocumentSchema
impl Default for DocumentSchema
Source§fn default() -> DocumentSchema
fn default() -> DocumentSchema
Returns the “default value” for a type. Read more
Source§impl Message for DocumentSchema
impl Message for DocumentSchema
Source§impl PartialEq for DocumentSchema
impl PartialEq for DocumentSchema
impl StructuralPartialEq for DocumentSchema
Auto Trait Implementations§
impl Freeze for DocumentSchema
impl RefUnwindSafe for DocumentSchema
impl Send for DocumentSchema
impl Sync for DocumentSchema
impl Unpin for DocumentSchema
impl UnwindSafe for DocumentSchema
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