pub struct SaveDialog { /* private fields */ }Expand description
The system’s dialog for choosing where to save a file. It asks before replacing a file that exists, so the path it returns can be written.
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::SaveDialog;
let chosen = SaveDialog::new("Contas.pdf").title("Exportar").filter("PDF", &["pdf"]).ask();
if let Some(path) = chosen {
std::fs::write(path, b"...")?;
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SaveDialog
impl RefUnwindSafe for SaveDialog
impl Send for SaveDialog
impl Sync for SaveDialog
impl Unpin for SaveDialog
impl UnsafeUnpin for SaveDialog
impl UnwindSafe for SaveDialog
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