pub struct ActionItem {
pub id: String,
pub title: String,
pub description: Option<String>,
pub tags: Vec<String>,
pub category: Option<String>,
}Expand description
A single action that can be invoked from the command palette.
Fields§
§id: StringUnique identifier for this action.
title: StringDisplay title (searched by the scorer).
description: Option<String>Optional description shown below the title.
Tags for boosting search relevance.
category: Option<String>Category for visual grouping (e.g., “Git”, “File”, “View”).
Implementations§
Source§impl ActionItem
impl ActionItem
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set description (builder).
Set tags (builder).
Sourcepub fn with_category(self, cat: impl Into<String>) -> Self
pub fn with_category(self, cat: impl Into<String>) -> Self
Set category (builder).
Trait Implementations§
Source§impl Clone for ActionItem
impl Clone for ActionItem
Source§fn clone(&self) -> ActionItem
fn clone(&self) -> ActionItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActionItem
impl RefUnwindSafe for ActionItem
impl Send for ActionItem
impl Sync for ActionItem
impl Unpin for ActionItem
impl UnsafeUnpin for ActionItem
impl UnwindSafe for ActionItem
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