pub struct FileDialogOptions { /* private fields */ }
Implementations§
Source§impl FileDialogOptions
impl FileDialogOptions
Sourcepub fn new() -> FileDialogOptions
pub fn new() -> FileDialogOptions
Create a new set of options.
Sourcepub fn select_directories(self) -> Self
pub fn select_directories(self) -> Self
Set directories to be selectable instead of files.
This is only relevant for open dialogs.
Sourcepub fn multi_selection(self) -> Self
pub fn multi_selection(self) -> Self
Set multiple items to be selectable.
This is only relevant for open dialogs.
Sourcepub fn allowed_types(self, types: Vec<FileSpec>) -> Self
pub fn allowed_types(self, types: Vec<FileSpec>) -> Self
Set the file types the user is allowed to select.
This filter is only applied to files and packages, but not to directories.
An empty collection is treated as no filter.
§macOS
These file types also apply to directories to define packages. Which means the directories that match the filter are no longer considered directories. The packages are defined by this collection even in directories mode.
Sourcepub fn default_name(self, default_name: impl Into<String>) -> Self
pub fn default_name(self, default_name: impl Into<String>) -> Self
Set the default filename that appears in the dialog.
Sourcepub fn force_starting_directory(self, path: impl Into<PathBuf>) -> Self
pub fn force_starting_directory(self, path: impl Into<PathBuf>) -> Self
Force the starting directory to the specified path
.
§User experience
This should almost never be used because it overrides the OS choice, which will usually be a directory that the user recently visited.
Trait Implementations§
Source§impl Clone for FileDialogOptions
impl Clone for FileDialogOptions
Source§fn clone(&self) -> FileDialogOptions
fn clone(&self) -> FileDialogOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FileDialogOptions
impl Debug for FileDialogOptions
Source§impl Default for FileDialogOptions
impl Default for FileDialogOptions
Source§fn default() -> FileDialogOptions
fn default() -> FileDialogOptions
Auto Trait Implementations§
impl Freeze for FileDialogOptions
impl RefUnwindSafe for FileDialogOptions
impl Send for FileDialogOptions
impl Sync for FileDialogOptions
impl Unpin for FileDialogOptions
impl UnwindSafe for FileDialogOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more