pub struct FilePickerSaveOptions { /* private fields */ }Expand description
Options class for the
IStorageProvider::save_file_picker_async
method.
Implementations§
Source§impl FilePickerSaveOptions
impl FilePickerSaveOptions
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_choices. 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 default_extension(&self) -> Option<&str>
pub fn default_extension(&self) -> Option<&str>
The default extension to be used to save the file.
pub fn set_default_extension(&mut self, value: Option<String>)
Sourcepub fn with_default_extension(self, value: impl Into<String>) -> Self
pub fn with_default_extension(self, value: impl Into<String>) -> Self
Sets default_extension and returns the
options.
Sourcepub fn file_type_choices(&self) -> Option<&[Rc<FilePickerFileType>]>
pub fn file_type_choices(&self) -> Option<&[Rc<FilePickerFileType>]>
The collection of valid file types that the user can choose to assign to a file.
pub fn set_file_type_choices( &mut self, value: Option<Vec<Rc<FilePickerFileType>>>, )
Sourcepub fn with_file_type_choices(self, value: Vec<Rc<FilePickerFileType>>) -> Self
pub fn with_file_type_choices(self, value: Vec<Rc<FilePickerFileType>>) -> Self
Sets file_type_choices and returns the
options.
Sourcepub fn show_overwrite_prompt(&self) -> Option<bool>
pub fn show_overwrite_prompt(&self) -> Option<bool>
A value indicating whether the file dialog displays a warning if the user specifies the name of a file that already exists.
pub fn set_show_overwrite_prompt(&mut self, value: Option<bool>)
Sourcepub fn with_show_overwrite_prompt(self, value: bool) -> Self
pub fn with_show_overwrite_prompt(self, value: bool) -> Self
Sets show_overwrite_prompt 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 FilePickerSaveOptions
impl Clone for FilePickerSaveOptions
Source§impl Default for FilePickerSaveOptions
impl Default for FilePickerSaveOptions
Source§impl Deref for FilePickerSaveOptions
impl Deref for FilePickerSaveOptions
Source§type Target = PickerOptions
type Target = PickerOptions
Source§fn deref(&self) -> &PickerOptions
fn deref(&self) -> &PickerOptions
Source§impl DerefMut for FilePickerSaveOptions
impl DerefMut for FilePickerSaveOptions
Source§fn deref_mut(&mut self) -> &mut PickerOptions
fn deref_mut(&mut self) -> &mut PickerOptions
Source§impl From<PickerOptions> for FilePickerSaveOptions
impl From<PickerOptions> for FilePickerSaveOptions
Source§fn from(base: PickerOptions) -> Self
fn from(base: PickerOptions) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for FilePickerSaveOptions
impl !Send for FilePickerSaveOptions
impl !Sync for FilePickerSaveOptions
impl !UnwindSafe for FilePickerSaveOptions
impl Freeze for FilePickerSaveOptions
impl Unpin for FilePickerSaveOptions
impl UnsafeUnpin for FilePickerSaveOptions
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