Skip to content

Support for generic types #4

@randomPoison

Description

@randomPoison

Currently, it's not really possible to implement TypeUuid for a generic type. You can implement it for a concrete instantiation of a type, but not generically for all instantiations, i.e. you can implement it for Vec<String> and Vec<usize>, but there's no way to implement it generically for all Vec<T>. The way to do this would be to automatically generate a UUID for the concrete instantiation of the type based on the UUIDs of the input types. In theory this can be done with const functions by writing a function that takes a pair of Bytes and spits out a new Bytes that mixes the two together in a collision-resistant way.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions