Struct win_nfd::FileOpenDialogBuilder
source · pub struct FileOpenDialogBuilder<'a, 'b, 'c> {
pub init_com: bool,
pub default_path: Option<&'a Path>,
pub path: Option<&'b Path>,
pub filetypes: FileFilters<'static>,
pub filename: Option<&'c OsStr>,
}Expand description
Builder for a FileOpenDialog
Fields§
§init_com: boolWhether to init com
default_path: Option<&'a Path>Path to open by default
path: Option<&'b Path>Path to open, regardless of past choices
filetypes: FileFilters<'static>File types
filename: Option<&'c OsStr>Filename
Implementations§
source§impl<'a, 'b, 'c> FileOpenDialogBuilder<'a, 'b, 'c>
impl<'a, 'b, 'c> FileOpenDialogBuilder<'a, 'b, 'c>
sourcepub fn new() -> Self
pub fn new() -> Self
Make a new FileOpenDialogBuilder.
sourcepub fn default_path(&mut self, default_path: &'a Path) -> &mut Self
pub fn default_path(&mut self, default_path: &'a Path) -> &mut Self
Set the default path where the dialog will open
sourcepub fn build(&self) -> Result<FileOpenDialog, NfdError>
pub fn build(&self) -> Result<FileOpenDialog, NfdError>
Build a dialog.