pub struct HashMapStore {Show 36 fields
pub roots: RwLock<HashMap<EntityId, Root>>,
pub workspaces: RwLock<HashMap<EntityId, Workspace>>,
pub systems: RwLock<HashMap<EntityId, System>>,
pub entitys: RwLock<HashMap<EntityId, Entity>>,
pub fields: RwLock<HashMap<EntityId, Field>>,
pub features: RwLock<HashMap<EntityId, Feature>>,
pub files: RwLock<HashMap<EntityId, File>>,
pub use_cases: RwLock<HashMap<EntityId, UseCase>>,
pub dtos: RwLock<HashMap<EntityId, Dto>>,
pub dto_fields: RwLock<HashMap<EntityId, DtoField>>,
pub globals: RwLock<HashMap<EntityId, Global>>,
pub relationships: RwLock<HashMap<EntityId, Relationship>>,
pub user_interfaces: RwLock<HashMap<EntityId, UserInterface>>,
pub jn_system_from_root_system: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_workspace_from_root_workspace: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_workspace_entities: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_feature_from_workspace_features: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_global_from_workspace_global: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_user_interface_from_workspace_user_interface: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_file_from_system_files: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_field_from_entity_fields: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_entity_inherits_from: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_relationship_from_entity_relationships: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_field_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_use_case_from_feature_use_cases: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_file_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_feature_from_file_feature: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_field_from_file_field: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_use_case_from_file_use_case: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_dto_from_use_case_dto_in: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_dto_from_use_case_dto_out: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_use_case_entities: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_dto_field_from_dto_fields: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_relationship_left_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub jn_entity_from_relationship_right_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>,
pub counters: RwLock<HashMap<String, EntityId>>,
/* private fields */
}Fields§
§roots: RwLock<HashMap<EntityId, Root>>§workspaces: RwLock<HashMap<EntityId, Workspace>>§systems: RwLock<HashMap<EntityId, System>>§entitys: RwLock<HashMap<EntityId, Entity>>§fields: RwLock<HashMap<EntityId, Field>>§features: RwLock<HashMap<EntityId, Feature>>§files: RwLock<HashMap<EntityId, File>>§use_cases: RwLock<HashMap<EntityId, UseCase>>§dtos: RwLock<HashMap<EntityId, Dto>>§dto_fields: RwLock<HashMap<EntityId, DtoField>>§globals: RwLock<HashMap<EntityId, Global>>§relationships: RwLock<HashMap<EntityId, Relationship>>§user_interfaces: RwLock<HashMap<EntityId, UserInterface>>§jn_system_from_root_system: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_workspace_from_root_workspace: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_workspace_entities: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_feature_from_workspace_features: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_global_from_workspace_global: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_user_interface_from_workspace_user_interface: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_file_from_system_files: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_field_from_entity_fields: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_entity_inherits_from: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_relationship_from_entity_relationships: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_field_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_use_case_from_feature_use_cases: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_file_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_feature_from_file_feature: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_field_from_file_field: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_use_case_from_file_use_case: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_dto_from_use_case_dto_in: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_dto_from_use_case_dto_out: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_use_case_entities: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_dto_field_from_dto_fields: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_relationship_left_entity: RwLock<HashMap<EntityId, Vec<EntityId>>>§jn_entity_from_relationship_right_entity: 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
Clone the entire store for savepoint support. O(1) thanks to im::HashMap.
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. O(1) thanks to im::HashMap structural sharing.
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 discard_savepoint(&self, savepoint_id: u64)
pub fn discard_savepoint(&self, savepoint_id: u64)
Discard a savepoint without restoring (used on successful commit).
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