pub struct HashMapStore {Show 26 fields
pub roots: RwLock<HashMap<EntityId, Root>>,
pub documents: RwLock<HashMap<EntityId, Document>>,
pub frames: RwLock<HashMap<EntityId, Frame>>,
pub blocks: RwLock<HashMap<EntityId, Block>>,
pub inline_elements: RwLock<HashMap<EntityId, InlineElement>>,
pub lists: RwLock<HashMap<EntityId, List>>,
pub resources: RwLock<HashMap<EntityId, Resource>>,
pub tables: RwLock<HashMap<EntityId, Table>>,
pub table_cells: RwLock<HashMap<EntityId, TableCell>>,
pub jn_document_from_root_document: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_frame_from_document_frames: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_list_from_document_lists: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_resource_from_document_resources: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_table_from_document_tables: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_block_from_frame_blocks: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_frame_from_frame_parent_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_table_from_frame_table: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_inline_element_from_block_elements: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_list_from_block_list: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_table_cell_from_table_cells: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_frame_from_table_cell_cell_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_back_root_document: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_back_document_frames: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_back_frame_blocks: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_back_frame_parent_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub counters: RwLock<HashMap<String, EntityId>>,
/* private fields */
}Expand description
All document data, held in plain HashMaps behind RefCell for interior
mutability. One instance per DbContext, shared by all tables within a
transaction scope via &HashMapStore.
Fields§
§roots: RwLock<HashMap<EntityId, Root>>§documents: RwLock<HashMap<EntityId, Document>>§frames: RwLock<HashMap<EntityId, Frame>>§blocks: RwLock<HashMap<EntityId, Block>>§inline_elements: RwLock<HashMap<EntityId, InlineElement>>§lists: RwLock<HashMap<EntityId, List>>§resources: RwLock<HashMap<EntityId, Resource>>§tables: RwLock<HashMap<EntityId, Table>>§table_cells: RwLock<HashMap<EntityId, TableCell>>§jn_document_from_root_document: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_frame_from_document_frames: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_list_from_document_lists: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_resource_from_document_resources: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_table_from_document_tables: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_block_from_frame_blocks: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_frame_from_frame_parent_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_table_from_frame_table: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_inline_element_from_block_elements: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_list_from_block_list: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_table_cell_from_table_cells: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_frame_from_table_cell_cell_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_back_root_document: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_back_document_frames: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_back_frame_blocks: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_back_frame_parent_frame: RwLock<HashMap<EntityId, Vec<EntityId>>>§counters: RwLock<HashMap<String, EntityId>>Implementations§
Source§impl HashMapStore
impl HashMapStore
pub fn new() -> Self
Sourcepub fn snapshot(&self) -> HashMapStoreSnapshot
pub fn snapshot(&self) -> HashMapStoreSnapshot
Deep-clone the entire store for savepoint support.
Sourcepub fn restore(&self, snap: &HashMapStoreSnapshot)
pub fn restore(&self, snap: &HashMapStoreSnapshot)
Restore from a savepoint snapshot.
Sourcepub fn create_savepoint(&self) -> u64
pub fn create_savepoint(&self) -> u64
Create a savepoint by snapshotting the entire store. Returns a savepoint id.
Sourcepub fn restore_savepoint(&self, savepoint_id: u64)
pub fn restore_savepoint(&self, savepoint_id: u64)
Restore the store to a previously created savepoint.
Sourcepub fn restore_without_counters(&self, snap: &HashMapStoreSnapshot)
pub fn restore_without_counters(&self, snap: &HashMapStoreSnapshot)
Restore entity and junction data but preserve current counters. Used for undo snapshots where IDs must remain monotonically increasing.
Sourcepub fn store_snapshot(&self) -> StoreSnapshot
pub fn store_snapshot(&self) -> StoreSnapshot
Create a type-erased store snapshot for undo.
Sourcepub fn restore_store_snapshot(&self, snap: &StoreSnapshot)
pub fn restore_store_snapshot(&self, snap: &StoreSnapshot)
Restore from a type-erased store snapshot (preserves counters).
Trait Implementations§
Source§impl Debug for HashMapStore
impl Debug for HashMapStore
Source§impl Default for HashMapStore
impl Default for HashMapStore
Source§fn default() -> HashMapStore
fn default() -> HashMapStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for HashMapStore
impl RefUnwindSafe for HashMapStore
impl Send for HashMapStore
impl Sync for HashMapStore
impl Unpin for HashMapStore
impl UnsafeUnpin for HashMapStore
impl UnwindSafe for HashMapStore
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