pub enum FileExplorerAction {
Show 30 variants
Select(FileUri),
Open(FileUri),
Toggle {
uri: FileUri,
expanded: bool,
},
RenameRequested {
uri: FileUri,
},
Rename(FileExplorerRename),
RemoveRequested {
uri: FileUri,
parent: Option<FileUri>,
},
Remove {
uri: FileUri,
parent: Option<FileUri>,
},
CreateFileRequested {
parent: FileUri,
},
CreateDirRequested {
parent: FileUri,
},
CreateFile(FileExplorerCreateFile),
CreateDir(FileExplorerCreateDir),
CopyPath {
uri: FileUri,
},
CopyRelativePath {
uri: FileUri,
},
CopyFile {
uri: FileUri,
},
CutFile {
uri: FileUri,
},
PasteInto {
target_dir: FileUri,
},
MoveEntry(FileExplorerMove),
Refresh {
uri: FileUri,
},
OpenTerminalHere {
uri: FileUri,
},
SearchInFolder {
uri: FileUri,
},
RevealInWorkspace {
uri: FileUri,
},
AddFolderToWorkspace {
uri: FileUri,
},
RemoveFolderFromWorkspace {
uri: FileUri,
},
SetWorkspaceRoot {
uri: FileUri,
},
OpenWorkspaceHere {
uri: FileUri,
},
OpenWorkspaceSettings,
CollapseAll,
ExpandAll,
RevealActiveFile,
SearchInWorkspace,
}Expand description
High-level intent emitted by snapshot and retained file explorers.
Requested variants start UI/application workflows; committed variants carry completed inline edit data. The widget never performs filesystem mutations. Context-menu items that require an absent handler are rendered disabled.
§Examples
use ailloli_ui_fs::FileUri;
use ailloli_ui_widgets::files::FileExplorerAction;
let uri = FileUri::parse("file:///repo/main.rs")?;
assert_eq!(FileExplorerAction::Select(uri.clone()), FileExplorerAction::Select(uri));Variants§
Select(FileUri)
Row selection changed to the URI.
Open(FileUri)
A leaf or context-menu target was activated.
Toggle
A branch changed expansion state.
RenameRequested
UI should begin or authorize renaming this URI.
Fields
uri: FileUriTarget URI before rename.
Rename(FileExplorerRename)
Inline rename was committed.
RemoveRequested
UI/application should confirm or begin removal.
Remove
Tree delete interaction was committed.
CreateFileRequested
UI should begin a file draft below the parent.
Fields
parent: FileUriIntended parent directory.
CreateDirRequested
UI should begin a directory draft below the parent.
Fields
parent: FileUriIntended parent directory.
CreateFile(FileExplorerCreateFile)
Inline file creation was committed.
CreateDir(FileExplorerCreateDir)
Inline directory creation was committed.
CopyPath
Copies an absolute/display path string through application integration.
Fields
uri: FileUriURI whose path is requested.
CopyRelativePath
Copies a path relative to its matching explorer root.
Fields
uri: FileUriURI whose relative path is requested.
CopyFile
Copies the file/directory entry to application clipboard state.
Fields
uri: FileUriSource URI.
CutFile
Cuts the entry into application clipboard state.
Fields
uri: FileUriSource URI.
PasteInto
Pastes clipboard content into a directory.
Fields
target_dir: FileUriDestination directory URI.
MoveEntry(FileExplorerMove)
Drag/drop move intent with resolved source/destination metadata.
Refresh
Requests refreshing one directory/workspace root.
Fields
uri: FileUriDirectory URI to refresh.
OpenTerminalHere
Requests a terminal rooted at a directory.
Fields
uri: FileUriDirectory URI.
SearchInFolder
Requests scoped search in a directory.
Fields
uri: FileUriDirectory URI.
RevealInWorkspace
Requests revealing the entry in a workspace integration.
Fields
uri: FileUriEntry URI.
AddFolderToWorkspace
Adds a directory as a workspace root.
Fields
uri: FileUriDirectory URI.
RemoveFolderFromWorkspace
Removes an existing explorer root from the workspace.
Fields
uri: FileUriRoot URI.
SetWorkspaceRoot
Replaces the workspace root with a directory.
Fields
uri: FileUriNew root URI.
OpenWorkspaceHere
Opens a workspace rooted at the URI.
Fields
uri: FileUriWorkspace root URI.
OpenWorkspaceSettings
Opens workspace settings.
CollapseAll
Collapses all branches.
ExpandAll
Expands all branches.
RevealActiveFile
Reveals the application’s active file.
SearchInWorkspace
Opens workspace-wide search.
Trait Implementations§
Source§impl Clone for FileExplorerAction
impl Clone for FileExplorerAction
Source§fn clone(&self) -> FileExplorerAction
fn clone(&self) -> FileExplorerAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileExplorerAction
impl Debug for FileExplorerAction
Source§impl PartialEq for FileExplorerAction
impl PartialEq for FileExplorerAction
impl Eq for FileExplorerAction
impl StructuralPartialEq for FileExplorerAction
Auto Trait Implementations§
impl Freeze for FileExplorerAction
impl RefUnwindSafe for FileExplorerAction
impl Send for FileExplorerAction
impl Sync for FileExplorerAction
impl Unpin for FileExplorerAction
impl UnwindSafe for FileExplorerAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.