Skip to main content

HashMapStore

Struct HashMapStore 

Source
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

Source

pub fn new() -> Self

Source

pub fn snapshot(&self) -> HashMapStoreSnapshot

Clone the entire store for savepoint support. O(1) thanks to im::HashMap.

Source

pub fn restore(&self, snap: &HashMapStoreSnapshot)

Restore from a savepoint snapshot.

Source

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.

Source

pub fn restore_savepoint(&self, savepoint_id: u64)

Restore the store to a previously created savepoint.

Source

pub fn discard_savepoint(&self, savepoint_id: u64)

Discard a savepoint without restoring (used on successful commit).

Source

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.

Source

pub fn store_snapshot(&self) -> StoreSnapshot

Create a type-erased store snapshot for undo.

Source

pub fn restore_store_snapshot(&self, snap: &StoreSnapshot)

Restore from a type-erased store snapshot (preserves counters).

Trait Implementations§

Source§

impl Debug for HashMapStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HashMapStore

Source§

fn default() -> HashMapStore

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.