pub struct OpenDialog { /* private fields */ }Expand description
The system’s dialog for choosing a file to open.
It blocks until answered and has to run on the UI thread, which is where
event handlers such as on_click run.
use ravenrs_platform_native::OpenDialog;
let chosen = OpenDialog::new().title("Abrir").filter("Texto", &["txt"]).ask();
if let Some(path) = chosen {
let text = std::fs::read_to_string(path)?;
}Implementations§
Trait Implementations§
Source§impl Debug for OpenDialog
impl Debug for OpenDialog
Source§impl Default for OpenDialog
impl Default for OpenDialog
Source§fn default() -> OpenDialog
fn default() -> OpenDialog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenDialog
impl RefUnwindSafe for OpenDialog
impl Send for OpenDialog
impl Sync for OpenDialog
impl Unpin for OpenDialog
impl UnsafeUnpin for OpenDialog
impl UnwindSafe for OpenDialog
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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