pub struct FileDialog {
pub kind: DialogKind,
pub title: String,
pub types: Vec<String>,
pub folder: Option<PathBuf>,
pub name: String,
}Expand description
A dialog as the platform shows it.
Fields§
§kind: DialogKind§title: StringShown above the files; empty for the platform’s own wording.
types: Vec<String>The file extensions allowed, without the dot, such as png; empty allows any.
folder: Option<PathBuf>The folder it opens in, which exists; None lets the platform choose.
name: StringThe file name a save dialog suggests; empty for none.
Implementations§
Source§impl FileDialog
impl FileDialog
Sourcepub fn new(
kind: DialogKind,
title: String,
types: &[&str],
folder: &str,
name: String,
) -> Result<Self, NoHomeFolder>
pub fn new( kind: DialogKind, title: String, types: &[&str], folder: &str, name: String, ) -> Result<Self, NoHomeFolder>
The dialog an app’s call asks for. types may be written with or without the dot.
folder is written as in the app, ~ included; it is left to the platform when
empty or not an existing folder.
§Errors
When folder starts with ~ and the home folder can’t be found.
Trait Implementations§
Source§impl Clone for FileDialog
impl Clone for FileDialog
Source§fn clone(&self) -> FileDialog
fn clone(&self) -> FileDialog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileDialog
impl Debug for FileDialog
impl Eq for FileDialog
Source§impl PartialEq for FileDialog
impl PartialEq for FileDialog
impl StructuralPartialEq for FileDialog
Auto Trait Implementations§
impl Freeze for FileDialog
impl RefUnwindSafe for FileDialog
impl Send for FileDialog
impl Sync for FileDialog
impl Unpin for FileDialog
impl UnsafeUnpin for FileDialog
impl UnwindSafe for FileDialog
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
Mutably borrows from an owned value. Read more