pub trait WritableFolderPicker {
// Required method
fn pick(&self) -> PickerFuture<Result<Option<String>, FilePickerError>>;
// Provided method
fn take_resumed_pick(&self) -> Option<String> { ... }
}Expand description
Presents the system “pick a writable folder” UI. Platform-provided (Android); desktop/web use the built-in backend.
Required Methods§
Sourcefn pick(&self) -> PickerFuture<Result<Option<String>, FilePickerError>>
fn pick(&self) -> PickerFuture<Result<Option<String>, FilePickerError>>
Resolves to the durable handle string, or None if the user cancelled.
Provided Methods§
Sourcefn take_resumed_pick(&self) -> Option<String>
fn take_resumed_pick(&self) -> Option<String>
Reclaims a grant whose result arrived after the composition that
requested it was torn down. On Android the activity (and the native app)
can be destroyed and recreated while the SAF picker is in front, so a
folder picked at that moment would otherwise be lost; the app drains this
on startup to recover it. Returns the recovered durable handle, usually
None. Backends that never lose a result keep the default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".