Merged
Conversation
Contributor
There was a problem hiding this comment.
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
|
Contributor
There was a problem hiding this comment.
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.
framework/base/src/storage/mappers/token/fungible_token_mapper.rs
Outdated
Show resolved
Hide resolved
framework/base/src/storage/mappers/token/token_attributes_mapper.rs
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust docs for all storage mappers, detailing the storage layout and main functionality.