HOWTO: Idiomatic Rust for callbacks with gtk (rust-gnome)
问题 I am currently learning Rust and looking to use it for developing a GUI based application with GTK+. My problem relates to registering callbacks to respond to GTK events/signals and mutating state within those callbacks. I have a working but inelegant solution, so I would like to ask if there is a cleaner, more idiomatic solution. I have implemented my code as a struct with method implementations, where the struct maintains references to the GTK widgets along with other state that it needs.