cushy::dialog

Trait PickFile

Source
pub trait PickFile {
    // Required methods
    fn pick_file<Callback>(&self, picker: &FilePicker, callback: Callback)
       where Callback: FnOnce(Option<PathBuf>) + Send + 'static;
    fn save_file<Callback>(&self, picker: &FilePicker, callback: Callback)
       where Callback: FnOnce(Option<PathBuf>) + Send + 'static;
    fn pick_files<Callback>(&self, picker: &FilePicker, callback: Callback)
       where Callback: FnOnce(Option<Vec<PathBuf>>) + Send + 'static;
    fn pick_folder<Callback>(&self, picker: &FilePicker, callback: Callback)
       where Callback: FnOnce(Option<PathBuf>) + Send + 'static;
    fn pick_folders<Callback>(&self, picker: &FilePicker, callback: Callback)
       where Callback: FnOnce(Option<Vec<PathBuf>>) + Send + 'static;
}
Expand description

Shows a FilePicker in a given mode.

Required Methods§

Source

fn pick_file<Callback>(&self, picker: &FilePicker, callback: Callback)
where Callback: FnOnce(Option<PathBuf>) + Send + 'static,

Shows a picker that selects a single file and invokes on_dismiss when the dialog is dismissed.

Source

fn save_file<Callback>(&self, picker: &FilePicker, callback: Callback)
where Callback: FnOnce(Option<PathBuf>) + Send + 'static,

Shows a picker that creates a new file and invokes on_dismiss when the dialog is dismissed.

Source

fn pick_files<Callback>(&self, picker: &FilePicker, callback: Callback)
where Callback: FnOnce(Option<Vec<PathBuf>>) + Send + 'static,

Shows a picker that selects one or more files and invokes on_dismiss when the dialog is dismissed.

Source

fn pick_folder<Callback>(&self, picker: &FilePicker, callback: Callback)
where Callback: FnOnce(Option<PathBuf>) + Send + 'static,

Shows a picker that selects a single folder/directory and invokes on_dismiss when the dialog is dismissed.

Source

fn pick_folders<Callback>(&self, picker: &FilePicker, callback: Callback)
where Callback: FnOnce(Option<Vec<PathBuf>>) + Send + 'static,

Shows a picker that selects one or more folders/directorys and invokes on_dismiss when the dialog is dismissed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§