pub struct Selection {
pub paths: Vec<PathBuf>,
}Expand description
Selection result containing one or more paths
Fields§
§paths: Vec<PathBuf>Selected filesystem paths
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn into_paths(self) -> Vec<PathBuf>
pub fn into_paths(self) -> Vec<PathBuf>
Consumes the selection and returns owned paths.
Sourcepub fn file_path_name(&self) -> Option<&Path>
pub fn file_path_name(&self) -> Option<&Path>
IGFD-like convenience: get the first selected full path.
This corresponds to GetFilePathName() semantics for single selection.
For multi-selection, this returns the first selected path in stable order.
Sourcepub fn file_name(&self) -> Option<&str>
pub fn file_name(&self) -> Option<&str>
IGFD-like convenience: get the first selected base file name.
This corresponds to GetFileName() semantics for single selection.
For multi-selection, this returns the first selected file name.
Sourcepub fn selection_named_paths(&self) -> Vec<(String, PathBuf)>
pub fn selection_named_paths(&self) -> Vec<(String, PathBuf)>
IGFD-like convenience: get all selected (file_name, full_path) pairs.
This is a Rust-friendly equivalent of GetSelection().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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