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.
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.