pub struct CommandSpec {
pub id: &'static str,
pub label: &'static str,
pub menu: &'static [&'static str],
pub shortcut: Option<&'static str>,
pub shortcut_mac: Option<&'static str>,
pub params: &'static str,
pub enabled: Enabled,
pub run: Run,
pub journal: bool,
pub undoable: bool,
}Fields§
§id: &'static str§label: &'static strRibbon/menu placement, e.g. ["Home", "Font"]. Empty = not in menus.
shortcut: Option<&'static str>Portable notation: Cmd is ⌘ on macOS and Ctrl elsewhere.
shortcut_mac: Option<&'static str>macOS override when its key differs. Equal to shortcut marks a Mac-only shortcut
(Align Left/Center): other platforms show none. See CommandInfo::shortcut_for_platform.
params: &'static str§enabled: Enabled§run: Run§journal: bool§undoable: boolImplementations§
Source§impl CommandSpec
impl CommandSpec
pub fn info(&self, s: &Session) -> CommandInfo
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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