Skip to content

Generate UUID from user-specified input string #9

@randomPoison

Description

@randomPoison

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions