title: Type must satisfy the static lifetime
body: <p>I'm trying to increase the structure of a Rust and GTK-RS application, but I cannot figure out how to deal with event connections. I see that the problem is in wrong lifetime, but I do not really understand how it could be fixed.</p>
  
  <pre><code>#[derive(Debug)]
  struct CreatingProfileUI {
      window: gtk::MessageDialog,
      profile_name_entry: gtk::Entry,
      add_btn: gtk::Button,
      cancel_btn: gtk::Button,
  }
  
  #[derive(Debug)]
  struct UI {
      window: gtk::Window,
  
      // Header
      url_entry: gtk::Entry,
      open_btn: gtk::Button,
  
      // Body
      add_profile_btn: gtk::Button,
      remove_profile_btn: gtk::Button,
      profiles_textview: gtk::TextView,
  
      // Creating profile
      creating_profile: CreatingProfileUI,
  
      // Statusbar
      statusbar: gtk::Statusbar,
  }
  
  impl UI {
      fn init(&amp;self) {
          self.add_profile_btn
              .connect_clicked(move |_| { &amp;self.creating_profile.window.run(); });
      }
  }
  </code></pre>
  
  <p>And I get this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0477]: the type `[closure@src/main.rs:109:46: 111:6 self:&amp;UI]` does not fulfill the required lifetime
     --&gt; src/main.rs:109:30
      |
  109 |         self.add_profile_btn.connect_clicked(move |_| {
      |                              ^^^^^^^^^^^^^^^
      |
      = note: type must satisfy the static lifetime
  </code></pre>