Trait cushy::dialog::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.

Object Safety§

This trait is not object safe.

Implementors§