Skip to main content

BuiltinAction

Enum BuiltinAction 

Source
pub enum BuiltinAction {
Show 41 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, EditBookmark, DeleteBookmark, NewBookmark, NewBookmarkFolder, 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).

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.

§

EditBookmark

Bookmark-only: edit the clicked bookmark (name/path).

§

DeleteBookmark

Bookmark-only: delete the clicked bookmark.

§

NewBookmark

Bookmarks view: create a new leaf bookmark.

§

NewBookmarkFolder

Bookmarks view: create a new (empty) bookmark folder.

§

Separator

A menu divider; never does anything.

Implementations§

Source§

impl BuiltinAction

Source

pub fn as_str(&self) -> &'static str

The configuration string identifying this action (also its menu label, unless the menu uses a dynamic label).

Source

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.

Source

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.

Source

pub fn is_directory_only(&self) -> bool

Whether this action only makes sense for directories (the menu drops it from file rows).

Source

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.

Source

pub fn is_bookmark_only(&self) -> bool

Whether this action only makes sense inside the bookmarks view’s own menu (it needs a bookmark entry as its target, or creates one).

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BuiltinAction

Source§

impl Debug for BuiltinAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BuiltinAction

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for BuiltinAction

Source§

impl PartialEq for BuiltinAction

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BuiltinAction

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BuiltinAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<C> AsyncPosition<()> for C

Source§

fn position(_index: usize)

Returns the position. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<C, I> Position<(), I> for C

Source§

fn position(&self, _index: &I)

Returns the position. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more