Crates.io | retable |
lib.rs | retable |
version | 0.7.0-alpha.5 |
source | src |
created_at | 2023-10-22 06:45:09.383402 |
updated_at | 2024-01-09 06:34:50.390261 |
description | An Atomic-like double indexed entity-attribute data structures. |
homepage | |
repository | https://github.com/RuofengX/retable |
max_upload_size | |
id | 1010415 |
size | 19,745 |
A Rust library for Atomic-like double-indexed entity-attribute data structures.
This lib comes with:
im
].Atom is a way to describe the modify of the database.
Data Part | Data Type | Field length | Description |
---|---|---|---|
Opration | u8 | 1 byte | Enum of four basic modify ops. |
Key | K(Generic) | Zero or Any | The type of index key. |
Value | V(Generic) | Zero or Any | The type of storage value. |
Delta | D(Generic) | Zero or Any | The type of modify value. |
Note that since the data struct is defined by user, there is no placeholder for empty field. In an other word, Atom use a packed layout to store the data. Therefore, these structs have the same memory layout:
Atom<u8,u16,()>
Atom<u8,(),u16>
Atom<u8,u8,u8>
Atom<u16,u8,()>
etc...
Written by RuofengX ยท Used in entropy-rs, the Game
License by MIT.