pub enum FileDialogResponse {
Opened(Vec<PathBuf>),
Saved(PathBuf),
Cancelled,
}Expand description
The result of a file dialog interaction.
Variants§
Opened(Vec<PathBuf>)
The user confirmed an Open operation. Contains the list of selected files or folders.
Saved(PathBuf)
The user confirmed a Save operation. Contains the destination path.
Cancelled
The user closed the dialog without confirming.
Implementations§
Source§impl FileDialogResponse
impl FileDialogResponse
Sourcepub fn path(&self) -> Option<&PathBuf>
pub fn path(&self) -> Option<&PathBuf>
Returns the first selected path regardless of whether the dialog was Open or Save.
Sourcepub fn paths(&self) -> Vec<PathBuf>
pub fn paths(&self) -> Vec<PathBuf>
Returns all selected paths. If this was a Save dialog, it returns a vec with a single path.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if the user cancelled the dialog.
Trait Implementations§
Source§impl Clone for FileDialogResponse
impl Clone for FileDialogResponse
Source§fn clone(&self) -> FileDialogResponse
fn clone(&self) -> FileDialogResponse
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 moreAuto Trait Implementations§
impl Freeze for FileDialogResponse
impl RefUnwindSafe for FileDialogResponse
impl Send for FileDialogResponse
impl Sync for FileDialogResponse
impl Unpin for FileDialogResponse
impl UnsafeUnpin for FileDialogResponse
impl UnwindSafe for FileDialogResponse
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