Conversation
I have ~2 hours, 1 bottle of Club Mate and an infinite hardstyle playlist to figure out the proper way to pray to Rust generics.

Wish me luck!
2
4
9
Edited 1 hour ago
Honestly, there is absolutely no way I could solve this without massive help from #LLM:

I wanted to define an interface with associated types to abstract away specific implementations of a component and used trait bounds (from a 3rd party lib) to provide guarantees about the associated types.

The problem was:

- 3rd party Traits forced generics on me that I didn't even use
- These generics had other bounds I needed to fulfill, which also what more bounds, etc.
- As a bonus, these two factors produce about a gazillion missing implementation errors for the first naive implementation, so you either need a really sharp debugger eye or will end up implementing one wrong solution after the other (as I did)

The solution for now is to drop the trait bound entirely (this is legal?!) and let the compiler intervene at the call site if someone doesn't implement the right trait - I complained exactly about this behavior the other day, because implementers can't figure out the bound just by looking at my trait, but at least now the code compiles and I left comments :P

#Rust

RE: https://infosec.place/objects/2c4cdbac-06e5-43bb-b070-044be09209b3
0
1
0