pub struct OpenFolder { /* private fields */ }Expand description
A native “choose folder” picker. .await (or .present().await) resolves to the chosen
directory as a FileUrl, or None if the user cancels — and None at once on a toolkit
without a folder chooser, so ask Cap::FolderDialog before
offering the command (phones answer Unsupported).
ⓘ
if let Some(dir) = open_folder().title(res::str::add_folder()).await {
scan(dir.local_path()?);
}Implementations§
Trait Implementations§
Source§impl IntoFuture for OpenFolder
impl IntoFuture for OpenFolder
Source§type IntoFuture = Pin<Box<dyn Future<Output = Option<FileUrl>>>>
type IntoFuture = Pin<Box<dyn Future<Output = Option<FileUrl>>>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> <OpenFolder as IntoFuture>::IntoFuture
fn into_future(self) -> <OpenFolder as IntoFuture>::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for OpenFolder
impl RefUnwindSafe for OpenFolder
impl Send for OpenFolder
impl Sync for OpenFolder
impl Unpin for OpenFolder
impl UnsafeUnpin for OpenFolder
impl UnwindSafe for OpenFolder
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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