pub struct EntityMap {
pub document_metadata: HashMap<String, String>,
pub pages: HashMap<usize, Vec<Entity>>,
pub schemas: Vec<String>,
}Expand description
Map of entities organized by page
Fields§
§document_metadata: HashMap<String, String>Document-level metadata
pages: HashMap<usize, Vec<Entity>>Entities organized by page number
schemas: Vec<String>Schema definitions used
Implementations§
Source§impl EntityMap
impl EntityMap
pub fn new() -> Self
Sourcepub fn add_entity(&mut self, entity: Entity)
pub fn add_entity(&mut self, entity: Entity)
Add an entity to the map
Sourcepub fn entities_by_type(&self, entity_type: EntityType) -> Vec<&Entity>
pub fn entities_by_type(&self, entity_type: EntityType) -> Vec<&Entity>
Get all entities of a specific type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityMap
impl<'de> Deserialize<'de> for EntityMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EntityMap
impl RefUnwindSafe for EntityMap
impl Send for EntityMap
impl Sync for EntityMap
impl Unpin for EntityMap
impl UnsafeUnpin for EntityMap
impl UnwindSafe for EntityMap
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