pub enum BuiltinAction {
Show 37 variants
Open,
OpenSplit,
InNewPanel,
InOppositePanel,
OpenWith,
OpenWithDefault,
ViewThumbnail,
NewFile,
NewFolder,
Rename,
Duplicate,
CopyPath,
CopyRelativePath,
AddBookmark,
Cut,
Copy,
Paste,
CreateLink,
Properties,
Trash,
DeletePermanently,
ToggleHidden,
SortByName,
SortBySize,
SortByModified,
SortByType,
ToggleSortAscending,
OpenFolder,
Filter,
SplitView,
Up,
Back,
Forward,
Collapse,
ClosePane,
ToggleBookmarks,
Separator,
}Expand description
A built-in context-menu action: everything the panel can do to a row that
is not a custom command. A Separator is only a
menu divider; it has no action.
Variants§
Open
Open: expand/collapse a directory, or open a file in its default app.
OpenSplit
Open the directory as a new split pane in the current dock.
InNewPanel
Open the directory as a new pane in the same panel (like a split view).
InOppositePanel
Open the directory in the opposite panel (the dock on the other side of the screen). The menu label names that side: “In right panel”.
OpenWith
Pick an application for the row and open it with that app.
OpenWithDefault
Open a file with its default application (a sibling of
Self::Open; the label shows the default app’s name).
ViewThumbnail
Show or hide an inline thumbnail preview: below an image row, or below every image inside a directory. Purely visual and non-persistent.
NewFile
Create a new file in the row’s target directory.
NewFolder
Create a new folder in the row’s target directory.
Rename
Inline-rename the row.
Duplicate
Duplicate the row.
CopyPath
Copy the row’s absolute path.
CopyRelativePath
Copy the row’s path relative to the tree root.
AddBookmark
Add the directory row to the bookmarks list.
Cut
Cut the selection (moved on the next paste).
Copy
Copy the selection (duplicated on the next paste).
Paste
Paste the clipboard into the row’s directory (the row itself for a directory, its parent for a file).
CreateLink
Create a symlink to the row next to it.
Properties
Show the row’s properties.
Trash
Move the row to the trash.
DeletePermanently
Permanently delete the row.
ToggleHidden
Toggle visibility of dotfiles in the current tree.
SortByName
Sort entries by name.
SortBySize
Sort entries by size.
SortByModified
Sort entries by modification time.
SortByType
Sort entries by type/extension.
ToggleSortAscending
Flip ascending/descending order.
OpenFolder
Pane-level: pick a folder to browse (the hamburger menu).
Filter
Pane-level: open the filter bar.
SplitView
Pane-level: split the pane.
Up
Pane-level: open the current directory’s parent (the enclosing folder).
Back
Pane-level: go back to the previously shown directory in this pane.
Forward
Pane-level: go forward again after going back.
Collapse
Pane-level: hide this pane’s whole side.
ClosePane
Pane-level: close this pane.
ToggleBookmarks
Pane-level: show or hide the bookmarks section in this dock.
Separator
A menu divider; never does anything.
Implementations§
Source§impl BuiltinAction
impl BuiltinAction
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The configuration string identifying this action (also its menu label, unless the menu uses a dynamic label).
Sourcepub fn default_shortcut(&self) -> Option<&'static str>
pub fn default_shortcut(&self) -> Option<&'static str>
The shortcut that a bare string item implies, when the user does not
spell one out. None for actions without a default key.
Sourcepub fn is_single_row_only(&self) -> bool
pub fn is_single_row_only(&self) -> bool
Whether this action operates on a single row only, and so should be hidden from a context menu opened over a multi-row selection. Actions that fan out over the selection (trash, delete, copy, cut, properties, copy path) are not listed here.
Sourcepub fn is_directory_only(&self) -> bool
pub fn is_directory_only(&self) -> bool
Whether this action only makes sense for directories (the menu drops it from file rows).
Sourcepub fn is_pane_action(&self) -> bool
pub fn is_pane_action(&self) -> bool
Whether this is a pane-level action (open a folder, filter, split, collapse, close) that the app, not a tree, must perform. Pane actions belong in the hamburger menu; a shortcut bound to one is routed upward.
Sourcepub fn parse(name: &str) -> Option<Self>
pub fn parse(name: &str) -> Option<Self>
Parse a configuration string, case-insensitively. "---" and
"separator" both spell a menu divider.
The typographic ellipsis (…, U+2026) is accepted as a synonym for
three ASCII dots (...) in labels, so configs written before the switch
to plain ASCII still load.
Trait Implementations§
Source§impl Clone for BuiltinAction
impl Clone for BuiltinAction
impl Copy for BuiltinAction
Source§impl Debug for BuiltinAction
impl Debug for BuiltinAction
Source§impl<'de> Deserialize<'de> for BuiltinAction
impl<'de> Deserialize<'de> for BuiltinAction
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for BuiltinAction
Source§impl PartialEq for BuiltinAction
impl PartialEq for BuiltinAction
Source§impl Serialize for BuiltinAction
impl Serialize for BuiltinAction
impl StructuralPartialEq for BuiltinAction
Auto Trait Implementations§
impl Freeze for BuiltinAction
impl RefUnwindSafe for BuiltinAction
impl Send for BuiltinAction
impl Sync for BuiltinAction
impl Unpin for BuiltinAction
impl UnsafeUnpin for BuiltinAction
impl UnwindSafe for BuiltinAction
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more