-
Notifications
You must be signed in to change notification settings - Fork 4
Description
This feature request is an alternative the functionality proposed in #8.
In addition to allowing the user to directly specify the UUID for a type, allow them to specify a unique input string that we hash to generate the UUID:
#[derive(TypeUuid)]
#[uuid(from = "some_sufficiently_unique_value")]
The main advantage of this approach is that it removes the need for users to manually generate the UUIDs themselves. Currently the workflow for adding a UUID to a type is somewhat cumbersome, since the user needs to have a way to generate the UUID themselves. In most cases, it would be easier for the user to specify a reasonably unique value since that removes the need for the user to switch to another application or find open a website to generate the UUID.
This approach should also still meet our requirements for stability when the type is moved or renamed, since the user can keep the input value for the UUID the same when renaming in order to keep the UUID constant.