FilePickerSaveOptions
struct · ferroui-base · v0.5.0
struct FilePickerSaveOptions
Options class for the
IStorageProvider::save_file_picker_async
method.
Members
newsuggested_file_typeset_suggested_file_typewith_suggested_file_typedefault_extensionset_default_extensionwith_default_extensionfile_type_choicesset_file_type_choiceswith_file_type_choicesshow_overwrite_promptset_show_overwrite_promptwith_show_overwrite_prompt
new
fn new() -> Self
Creates options with nothing set.
suggested_file_type
fn suggested_file_type(self: &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.
set_suggested_file_type
fn set_suggested_file_type(self: &mut Self, value: Option<Rc<FilePickerFileType>>)
with_suggested_file_type
fn with_suggested_file_type(self: Self, value: Rc<FilePickerFileType>) -> Self
Sets suggested_file_type and returns
the options.
default_extension
fn default_extension(self: &Self) -> Option<&str>
The default extension to be used to save the file.
set_default_extension
fn set_default_extension(self: &mut Self, value: Option<String>)
with_default_extension
fn with_default_extension(self: Self, value: impl Into<String>) -> Self
Sets default_extension and returns the
options.
file_type_choices
fn file_type_choices(self: &Self) -> Option<&[Rc<FilePickerFileType>]>
The collection of valid file types that the user can choose to assign to a file.
set_file_type_choices
fn set_file_type_choices(self: &mut Self, value: Option<Vec<Rc<FilePickerFileType>>>)
with_file_type_choices
fn with_file_type_choices(self: Self, value: Vec<Rc<FilePickerFileType>>) -> Self
Sets file_type_choices and returns the
options.
show_overwrite_prompt
fn show_overwrite_prompt(self: &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.
set_show_overwrite_prompt
fn set_show_overwrite_prompt(self: &mut Self, value: Option<bool>)
with_show_overwrite_prompt
fn with_show_overwrite_prompt(self: Self, value: bool) -> Self
Sets show_overwrite_prompt and
returns the options.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDefaultDerefDerefMutFrom<PickerOptions>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.