pub struct FilePickerOpenOptions { /* private fields */ }Expand description
Options class for the
IStorageProvider::open_file_picker_async
method.
Implementations§
Source§impl FilePickerOpenOptions
impl FilePickerOpenOptions
Sourcepub fn suggested_file_type(&self) -> Option<&Rc<FilePickerFileType>>
pub fn suggested_file_type(&self) -> Option<&Rc<FilePickerFileType>>
The file type that should be preselected when the dialog is opened.
This value should reference one of the items in
file_type_filter. If not set, the first
file type may be selected by default.
pub fn set_suggested_file_type(&mut self, value: Option<Rc<FilePickerFileType>>)
Sourcepub fn with_suggested_file_type(self, value: Rc<FilePickerFileType>) -> Self
pub fn with_suggested_file_type(self, value: Rc<FilePickerFileType>) -> Self
Sets suggested_file_type and returns
the options.
Sourcepub fn allow_multiple(&self) -> bool
pub fn allow_multiple(&self) -> bool
An option indicating whether the open picker allows users to select multiple files.
pub fn set_allow_multiple(&mut self, value: bool)
Sourcepub fn with_allow_multiple(self, value: bool) -> Self
pub fn with_allow_multiple(self, value: bool) -> Self
Sets allow_multiple and returns the
options.
Sourcepub fn file_type_filter(&self) -> Option<&[Rc<FilePickerFileType>]>
pub fn file_type_filter(&self) -> Option<&[Rc<FilePickerFileType>]>
The collection of file types that the file open picker displays.
pub fn set_file_type_filter( &mut self, value: Option<Vec<Rc<FilePickerFileType>>>, )
Sourcepub fn with_file_type_filter(self, value: Vec<Rc<FilePickerFileType>>) -> Self
pub fn with_file_type_filter(self, value: Vec<Rc<FilePickerFileType>>) -> Self
Sets file_type_filter and returns the
options.
Methods from Deref<Target = PickerOptions>§
pub fn set_title(&mut self, value: Option<String>)
Sourcepub fn suggested_start_location(&self) -> Option<&Rc<dyn IStorageFolder>>
pub fn suggested_start_location(&self) -> Option<&Rc<dyn IStorageFolder>>
The initial location where the file open picker looks for files to
present to the user. Can be obtained from previously picked folder
or using IStorageProvider::try_get_folder_from_path_async
or IStorageProvider::try_get_well_known_folder_async.
pub fn set_suggested_start_location( &mut self, value: Option<Rc<dyn IStorageFolder>>, )
Sourcepub fn suggested_file_name(&self) -> Option<&str>
pub fn suggested_file_name(&self) -> Option<&str>
The file name that the file picker suggests to the user.
pub fn set_suggested_file_name(&mut self, value: Option<String>)
Trait Implementations§
Source§impl Clone for FilePickerOpenOptions
impl Clone for FilePickerOpenOptions
Source§impl Default for FilePickerOpenOptions
impl Default for FilePickerOpenOptions
Source§impl Deref for FilePickerOpenOptions
impl Deref for FilePickerOpenOptions
Source§type Target = PickerOptions
type Target = PickerOptions
Source§fn deref(&self) -> &PickerOptions
fn deref(&self) -> &PickerOptions
Source§impl DerefMut for FilePickerOpenOptions
impl DerefMut for FilePickerOpenOptions
Source§fn deref_mut(&mut self) -> &mut PickerOptions
fn deref_mut(&mut self) -> &mut PickerOptions
Source§impl From<PickerOptions> for FilePickerOpenOptions
impl From<PickerOptions> for FilePickerOpenOptions
Source§fn from(base: PickerOptions) -> Self
fn from(base: PickerOptions) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for FilePickerOpenOptions
impl !Send for FilePickerOpenOptions
impl !Sync for FilePickerOpenOptions
impl !UnwindSafe for FilePickerOpenOptions
impl Freeze for FilePickerOpenOptions
impl Unpin for FilePickerOpenOptions
impl UnsafeUnpin for FilePickerOpenOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more