Trait gtk::prelude::NativeDialogExtManual [−][src]
pub trait NativeDialogExtManual { fn run_future<'a>(
&'a self
) -> Pin<Box<dyn Future<Output = ResponseType> + 'a>>; }
Required methods
fn run_future<'a>(&'a self) -> Pin<Box<dyn Future<Output = ResponseType> + 'a>>
fn run_future<'a>(&'a self) -> Pin<Box<dyn Future<Output = ResponseType> + 'a>>
This is supported on crate feature
v3_20
only.Shows the dialog and returns a Future
that resolves to the
ResponseType
on response.
use gtk::prelude::*; let dialog = gtk::FileChooserNativeBuilder::new() .title("Select a File") .build(); dialog.run_future().await; println!("Selected file: {:?}", dialog.file()); dialog.destroy();