-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Have you ever considered supporting newtype derivations for string-backed identifiers?
I'm thinking of a similar reference-buffer duality as one between std::path::Path and PathBuf that gives you an option to wrap a str with the newtype without allocating, e.g.:
struct DatasetID(str);
struct DatasetIDBuf(String);While some of the existing derivations are compatible with these types it still leaves a large enough amount of boilerplate to be written to enable conversions and comparisons between the two to discourage the use of the newtype pattern for string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels