12 ms·
A Union in itself is not a sum type. Rust even has unions: https://doc.rust-lang.org/reference/items/unions.html https://doc.rust-lang.org/reference/items/unio
by diarrhea 3y ago
A Union in itself is not a sum type. Rust even has unions:
https://doc.rust-lang.org/reference/items/unions.html https://doc.rust-lang.org/reference/items/unions.html
The unions of Rust are tagged unions that can hold data:
https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html
which is immensely powerful in data modeling.