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§
sourcefn pick_file<Callback>(&self, picker: &FilePicker, callback: Callback)
fn pick_file<Callback>(&self, picker: &FilePicker, callback: Callback)
Shows a picker that selects a single file and invokes on_dismiss
when
the dialog is dismissed.
sourcefn save_file<Callback>(&self, picker: &FilePicker, callback: Callback)
fn save_file<Callback>(&self, picker: &FilePicker, callback: Callback)
Shows a picker that creates a new file and invokes on_dismiss
when the
dialog is dismissed.
sourcefn pick_files<Callback>(&self, picker: &FilePicker, callback: Callback)
fn pick_files<Callback>(&self, picker: &FilePicker, callback: Callback)
Shows a picker that selects one or more files and invokes on_dismiss
when the dialog is dismissed.
sourcefn pick_folder<Callback>(&self, picker: &FilePicker, callback: Callback)
fn pick_folder<Callback>(&self, picker: &FilePicker, callback: Callback)
Shows a picker that selects a single folder/directory and invokes
on_dismiss
when the dialog is dismissed.
sourcefn pick_folders<Callback>(&self, picker: &FilePicker, callback: Callback)
fn pick_folders<Callback>(&self, picker: &FilePicker, callback: Callback)
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.