Y
Hacker News
new
|
ask
|
show
|
jobs
by
orthoxerox
1446 days ago
Rust also has associated types, which are exposed to the implementer, but not to the consumer.
1 comments
maxbond
1446 days ago
I mean, generics and associated types aren't equivalent, but they also are often exposed to the consumer. Eg, if you're accepting an Iterator, you'll want to populate the Item associated type.
link