pub struct FileDialogState<Global, Event, Error> { /* private fields */ }
Implementations§
Source§impl<Global, Event, Error> FileDialogState<Global, Event, Error>
impl<Global, Event, Error> FileDialogState<Global, Event, Error>
pub fn new() -> Self
pub fn open_dialog(&mut self, path: impl AsRef<Path>) -> Result<(), Error>
pub fn save_dialog( &mut self, path: impl AsRef<Path>, name: impl AsRef<str>, ) -> Result<(), Error>
pub fn save_dialog_ext( &mut self, path: impl AsRef<Path>, name: impl AsRef<str>, ext: impl AsRef<str>, ) -> Result<(), Error>
pub fn map_outcome( &mut self, m: impl Fn(FileOutcome) -> Control<Event> + 'static, )
pub fn directory_dialog(&mut self, path: impl AsRef<Path>) -> Result<(), Error>
Sourcepub fn set_filter(&mut self, filter: impl Fn(&Path) -> bool + 'static)
pub fn set_filter(&mut self, filter: impl Fn(&Path) -> bool + 'static)
Set a filter.
Sourcepub fn use_default_roots(&mut self, roots: bool)
pub fn use_default_roots(&mut self, roots: bool)
Use the default set of roots.
Sourcepub fn clear_roots(&mut self)
pub fn clear_roots(&mut self)
Clear all roots.
Sourcepub fn default_roots(&mut self, start: &Path, last: &Path)
pub fn default_roots(&mut self, start: &Path, last: &Path)
Append the default roots.
Trait Implementations§
Source§impl<Global, Event, Error> DialogState<Global, Event, Error> for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> DialogState<Global, Event, Error> for FileDialogState<Global, Event, Error>
Auto Trait Implementations§
impl<Global, Event, Error> !Freeze for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> !RefUnwindSafe for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> !Send for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> !Sync for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> Unpin for FileDialogState<Global, Event, Error>
impl<Global, Event, Error> !UnwindSafe for FileDialogState<Global, Event, Error>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more