pub fn openfile() {
  let path = FileDialog::new()
    .set_location("~/")
    .show_open_single_file()
    .unwrap();
  let path = match path {
    Some(path) => path,
    None => return,
  };
  dbg!(path);
}

Ich möchte die Variable path von diesem Code-Snippet global nutzen, weiß aber nicht, wie. Dieses Snippet ist in gui.rs und ich möchte "path" in der main.rs nutzen.