pub struct FileDialog<'a> { /* private fields */ }
Expand description

Builds and shows file dialogs.

Implementations

Creates a file dialog builder.

Sets the default value of the filename text field in the dialog. For open dialogs of macOS and zenity, this is a no-op because there’s no such text field on the dialog.

Resets the default value of the filename field in the dialog.

Sets the default location that the dialog shows at open.

Resets the default location that the dialog shows at open. Without a default location set, the dialog will probably use the current working directory as default location.

Adds a file type filter. The filter must contains at least one extension, otherwise this method will panic. For dialogs that open directories, this is a no-op.

Removes all file type filters.

Sets the owner of the dialog. On Unix and GNU/Linux, this is a no-op.

Sets the owner of the dialog by raw handle. On Unix and GNU/Linux, this is a no-op.

Safety

It’s the caller’s responsibility that ensuring the handle is valid.

Resets the owner of the dialog to nothing.

Shows a dialog that let users to open one file.

Shows a dialog that let users to open multiple files.

Shows a dialog that let users to open one directory.

Shows a dialog that let users to save one file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.