This is pretty easy to understand if you have a cursory understanding of Rust and HTML.
I won't get into the HTML part (I think it's obvious), but the
$(|_e| count.increment())
part is a rust closure. |_e| is the argument to the closure, which has a leading underscore because it's unused. I imagine it's some context about the event (thus the e).
The rest is the body of the closure. It increments the count.
I won't get into the HTML part (I think it's obvious), but the
part is a rust closure. |_e| is the argument to the closure, which has a leading underscore because it's unused. I imagine it's some context about the event (thus the e). The rest is the body of the closure. It increments the count.pretty simply