forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sui Framework] Better types and API's in ID module
Big cleanup of the ID module that should hopefully help with usability. - Get rid of `IDBytes`, which is not very intuitive. The equivalent type is now called `ID`. - Rename functions for getting `ID`'s or a `vector<u8>` encoding of an ID from an object. These are likely to be the most commonly used, so tried to give them concise names and sensible type signatures. - Introduce abort code for `new_from_bytes` - Hid functions that let the programmer read the `version` of the object - Hid functions that let the programmer see that an ID is encoded as an `address` under the hood. We may want the flexibility to change this. - Introduce a `UniqueID` type to represent a globally unique ID. This isn't currently exposed to users and is technically redundant (i.e., could replace it with `ID` without any consequences), but keeping it to preserve the conceptual distinction between (1) unprivileged ID's that can be constructed by anyone, (2) privileged ID's that are guaranteed to be globally unique, (3) privileged versioned ID's. (2) may be useful in the future. - Lot of doc comments and general reorg.
- Loading branch information
1 parent
1168b64
commit 9e81cd8
Showing
19 changed files
with
246 additions
and
148 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.