pub struct CommandAction {
pub command: String,
pub label: Option<String>,
pub shortcut: Option<String>,
pub hidden: bool,
}Expand description
A custom command run with the row’s path. The {path} marker is replaced
with the row’s full path; {dir} with the directory itself for a directory
row or its parent for a file. With no marker, the path is appended as the
final argument.
Fields§
§command: String§label: Option<String>Optional menu label; defaults to the command text.
shortcut: Option<String>Optional accelerator (GTK syntax: "Ctrl+Shift+m", "F2", "Delete").
While the tree is focused, the key fires this command against the row
under the keyboard cursor.
Hide this item from the rendered menu while keeping its shortcut live — a way to bind a key without cluttering the menu.
Trait Implementations§
Source§impl Clone for CommandAction
impl Clone for CommandAction
Source§impl Debug for CommandAction
impl Debug for CommandAction
Source§impl<'de> Deserialize<'de> for CommandAction
impl<'de> Deserialize<'de> for CommandAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CommandAction
Source§impl PartialEq for CommandAction
impl PartialEq for CommandAction
Source§impl Serialize for CommandAction
impl Serialize for CommandAction
impl StructuralPartialEq for CommandAction
Auto Trait Implementations§
impl Freeze for CommandAction
impl RefUnwindSafe for CommandAction
impl Send for CommandAction
impl Sync for CommandAction
impl Unpin for CommandAction
impl UnsafeUnpin for CommandAction
impl UnwindSafe for CommandAction
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
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> 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> ⓘ
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 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> ⓘ
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