FilePickerOpenOptions
struct · ferroui-base · v0.5.0
struct FilePickerOpenOptions
Options class for the
IStorageProvider::open_file_picker_async
method.
Members
newsuggested_file_typeset_suggested_file_typewith_suggested_file_typeallow_multipleset_allow_multiplewith_allow_multiplefile_type_filterset_file_type_filterwith_file_type_filter
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_filter. 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.
allow_multiple
fn allow_multiple(self: &Self) -> bool
An option indicating whether the open picker allows users to select multiple files.
set_allow_multiple
fn set_allow_multiple(self: &mut Self, value: bool)
with_allow_multiple
fn with_allow_multiple(self: Self, value: bool) -> Self
Sets allow_multiple and returns the
options.
file_type_filter
fn file_type_filter(self: &Self) -> Option<&[Rc<FilePickerFileType>]>
The collection of file types that the file open picker displays.
set_file_type_filter
fn set_file_type_filter(self: &mut Self, value: Option<Vec<Rc<FilePickerFileType>>>)
with_file_type_filter
fn with_file_type_filter(self: Self, value: Vec<Rc<FilePickerFileType>>) -> Self
Sets file_type_filter 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.