-
Notifications
You must be signed in to change notification settings - Fork 107
storage mapper docs #2273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage mapper docs #2273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive Rust documentation to all storage mapper types in the MultiversX framework, detailing their storage layouts, main operations, trade-offs, use cases, and practical examples.
Changes:
- Added detailed Rust documentation (docstrings) for 17 storage mapper types covering storage layout, operations, trade-offs, and usage examples
- Converted error message and suffix constants from
&[u8]byte string literals to&strstring literals with corresponding.as_bytes()calls where needed - Reorganized constant declarations (changing from
statictoconstand reordering for consistency)
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| whitelist_mapper.rs | Added extensive documentation and converted error constant from &[u8] to &str |
| vec_mapper.rs | Added documentation explaining 1-based indexing and storage patterns |
| user_mapper.rs | Added documentation for user management and converted suffix constants to &str |
| unordered_set_mapper.rs | Added documentation explaining O(1) set operations |
| unique_id_mapper.rs | Added documentation for ID permutation tracking with space optimization |
| token/token_attributes_mapper.rs | Added comprehensive NFT/SFT attribute management documentation and converted constants to &str |
| token/non_fungible_token_mapper.rs | Added NFT/SFT lifecycle documentation and converted error constant to &str |
| token/fungible_token_mapper.rs | Added fungible token management documentation with DeFi examples |
| single_value_mapper.rs | Added documentation for simple key-value storage pattern |
| set_mapper.rs | Added documentation explaining ordered set with insertion order preservation |
| queue_mapper.rs | Added documentation for double-ended queue operations |
| ordered_binary_tree_mapper.rs | Added BST documentation and converted error/suffix constants to &str |
| map_storage_mapper.rs | Added documentation for nested storage mapper pattern |
| map_mapper.rs | Added HashMap-like documentation and converted constant to &str |
| linked_list_mapper.rs | Added documentation for doubly-linked list operations |
| bi_di_mapper.rs | Added documentation for bidirectional mapping |
| address_to_id_mapper.rs | Added documentation for address-to-ID mapping and converted constants to &str |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
framework/base/src/storage/mappers/token/fungible_token_mapper.rs
Outdated
Show resolved
Hide resolved
framework/base/src/storage/mappers/ordered_binary_tree_mapper.rs
Outdated
Show resolved
Hide resolved
framework/base/src/storage/mappers/ordered_binary_tree_mapper.rs
Outdated
Show resolved
Hide resolved
|
Contract comparison - from 64f2da4 to d1470e8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rust docs for all storage mappers, detailing the storage layout and main functionality.