[−][src]Struct nfd2::DialogBuilder
Methods
impl<'a> DialogBuilder<'a>
[src]
pub fn new(dialog_type: DialogType) -> Self
[src]
pub fn single() -> Self
[src]
Creates a builder for selecting a single file
pub fn multiple() -> Self
[src]
Creates a builder for selecting multiple files
pub fn filter(&'a mut self, filter: &'a str) -> &mut DialogBuilder<'a>
[src]
Adds a filter to the dialog
Separators
;
Begin a new filter.,
Add a separate type to the filter.
Examples
txt
The default filter is for text files. There is a wildcard option in a dropdown.png,jpg;psd
The default filter is forpng
andjpg
files. A second filter is available forpsd
files. There is a wildcard option in a dropdown.- Not applying any filters means only the wildcard option is available.
See the documentation of the underlying C lib for more info.
pub fn default_path<P: AsRef<Path>>(
&'a mut self,
path: &'a P
) -> &mut DialogBuilder<'a>
[src]
&'a mut self,
path: &'a P
) -> &mut DialogBuilder<'a>
Specify the default directory to start the dialog in, otherwise the default directory will be dependent upon the host API
pub fn open(&self) -> Result<Response>
[src]
Opens the dialog and waits upon a response from the user
Auto Trait Implementations
impl<'a> RefUnwindSafe for DialogBuilder<'a>
impl<'a> Send for DialogBuilder<'a>
impl<'a> Sync for DialogBuilder<'a>
impl<'a> Unpin for DialogBuilder<'a>
impl<'a> UnwindSafe for DialogBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,