How to set a variable inside a gtk-rs closure?
问题 I'm building a markdown app, and I want to keep two copies of the text, one a source text, and the other the TextBuffer with all the correct tags and such. I need to set the contents of this source field inside a closure: buffer.connect_begin_user_action(clone!(source => move |a| { let text = a.get_text(&a.get_start_iter(), &a.get_end_iter(), false).unwrap(); source = text; // error: cannot assign to captured outer variable in an `Fn` closure An alternative might be to set some attribute on