When to use associated type vs generic parameter in Rust?
Hi everyone! I started learning Rust and encountered a difficulty: I can't understand when to use associated types and when to use regular generic parameters. \n\nFor example, I'm writing a trait for some iterator or collection. If I want the struct to have an element type, I can do this:\n\n```rust\ntrait MyIterator {\n fn next(&mut self) -> Option;\n}\n```\n\nOr like this:\n\n```rust\ntrait MyIterator {\n type Item;\n fn next(&mut self) -> Option;\n}\n```\n\nBoth options seem to work, but I've heard there's a difference in how they are applied in practice. I don't quite understand: when should I choose one way and when the other? \n\nConcrete example: I'm writing a trait for geometric shapes that have an area