Hello people of Rust!
And boy, even after reading all of the guide and doing some of the excercises here, it’s still quite a challenge to wrap your head around all the ownership concepts once you start writing some actual code.
I figured I’d implement a basic
EventEmitter to get my feet wet. I had a nice API in mind and then I went ahead to write code for it.It yook me quite some time (2h?) to make it work, but in the end I managed to get it to compile!
Here’s the link to the code on playground
Now I’m wondering whether this is 1) idomatic rust code and 2) if there would have been any shortcuts to make it more simple (while sticking to the api used in the
Any pointers will be greatly appreciated!
Thanks a lot,