Practice
Learn
← Quit
0 / 0 correct
Rust
Medium
1 of 20
What does the newtype pattern struct UserId(u64) buy you?
A
Type safety: a UserId can't be passed where an OrderId or raw u64 is expected, at zero runtime cost
B
Automatic database storage
C
Implicit conversion to u64
D
Faster arithmetic