[][src]Struct nfd2::DialogBuilder

pub struct DialogBuilder<'a> { /* fields omitted */ }

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 for png and jpg files. A second filter is available for psd 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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.