pub struct CommandCatalogItem {
pub label: Arc<str>,
pub value: Arc<str>,
pub disabled: bool,
pub keywords: Vec<Arc<str>>,
pub shortcut: Option<Arc<str>>,
pub command: CommandId,
}Expand description
Data-only command item derived from host command metadata and current window gating state.
Fields§
§label: Arc<str>§value: Arc<str>§disabled: bool§keywords: Vec<Arc<str>>§shortcut: Option<Arc<str>>§command: CommandIdImplementations§
Source§impl CommandCatalogItem
impl CommandCatalogItem
pub fn new(label: impl Into<Arc<str>>, command: impl Into<CommandId>) -> Self
pub fn value(self, value: impl Into<Arc<str>>) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn keywords<I, S>(self, keywords: I) -> Self
pub fn shortcut(self, shortcut: impl Into<Arc<str>>) -> Self
Trait Implementations§
Source§impl Clone for CommandCatalogItem
impl Clone for CommandCatalogItem
Source§fn clone(&self) -> CommandCatalogItem
fn clone(&self) -> CommandCatalogItem
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 moreSource§impl Debug for CommandCatalogItem
impl Debug for CommandCatalogItem
Source§impl PartialEq for CommandCatalogItem
impl PartialEq for CommandCatalogItem
impl Eq for CommandCatalogItem
impl StructuralPartialEq for CommandCatalogItem
Auto Trait Implementations§
impl Freeze for CommandCatalogItem
impl RefUnwindSafe for CommandCatalogItem
impl Send for CommandCatalogItem
impl Sync for CommandCatalogItem
impl Unpin for CommandCatalogItem
impl UnsafeUnpin for CommandCatalogItem
impl UnwindSafe for CommandCatalogItem
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