pub struct Dialog { /* private fields */ }Expand description
A file dialog, from Os::dialog, shown by one of its async methods.
Implementations§
Source§impl Dialog
impl Dialog
Sourcepub fn filter(self, name: impl Into<String>, extensions: &[&str]) -> Self
pub fn filter(self, name: impl Into<String>, extensions: &[&str]) -> Self
Offers the files whose extension is one of extensions, as name.
Sourcepub async fn open_file(self) -> Option<PathBuf>
pub async fn open_file(self) -> Option<PathBuf>
The file the person chose, or None when they cancelled.
Sourcepub async fn open_files(self) -> Option<Vec<PathBuf>>
pub async fn open_files(self) -> Option<Vec<PathBuf>>
The files the person chose, or None when they cancelled.
Sourcepub async fn pick_folder(self) -> Option<PathBuf>
pub async fn pick_folder(self) -> Option<PathBuf>
The folder the person chose, or None when they cancelled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dialog
impl RefUnwindSafe for Dialog
impl Send for Dialog
impl Sync for Dialog
impl Unpin for Dialog
impl UnsafeUnpin for Dialog
impl UnwindSafe for Dialog
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.