greyblake / nutype

Rust newtype with guarantees πŸ‡ΊπŸ‡¦ πŸ¦€
MIT License
1.4k stars 23 forks source link

Add support to UUID #165

Closed ronanM closed 2 months ago

ronanM commented 2 months ago

UUID fields are often used in data/DB design.

greyblake commented 2 months ago

If you need UUID, you should use uuid crate and proper uuid::Uuid type instead of trying to fake uuid with

struct Uuid(String)

or something similar.

If I misunderstood your request please reopen and elaborate more on it.

ronanM commented 2 months ago

Ok, Nutype can't offer benefits over struct MyUuid(Uuid) ?

greyblake commented 2 months ago

@ronanM Could you please give some examples of what kind of benefits would you expect?