pub struct FilePicked {
pub kind: &'static str,
pub tag: String,
pub paths: Vec<PathBuf>,
}Expand description
Emitted when the user resolves a native file dialog (open / save / folder / multi-open).
- One message per closed dialog; cancelled dialogs still emit with empty
Self::pathsso scripts can clean up. - The scripting layer routes by
Self::kindtoon_file_picked(tag, path),on_files_picked(tag, paths)(paths joined by|), oron_folder_picked(tag, path).
Fields§
§kind: &'static str"open" | "open_multi" | "save" | "folder". Selects which scripting dispatcher receives the message.
tag: StringIdentifier carried through from pick_file(tag) / pick_files(tag) / pick_folder(tag) / save_file(tag, name), routed through the per-id on() registry.
paths: Vec<PathBuf>Resolved path(s): single entry for open / save / folder; one or more for open_multi; empty for cancellation.
Trait Implementations§
Source§impl Clone for FilePicked
impl Clone for FilePicked
Source§fn clone(&self) -> FilePicked
fn clone(&self) -> FilePicked
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilePicked
impl Debug for FilePicked
impl Message for FilePicked
Auto Trait Implementations§
impl Freeze for FilePicked
impl RefUnwindSafe for FilePicked
impl Send for FilePicked
impl Sync for FilePicked
impl Unpin for FilePicked
impl UnsafeUnpin for FilePicked
impl UnwindSafe for FilePicked
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.