pub trait CommandNameExt {
// Required methods
fn name(self) -> CommandMetaVar<Txt>;
fn init_name(self, name: impl Into<Txt>) -> Self;
fn name_with_shortcut(self) -> Var<Txt>
where Self: CommandShortcutExt;
}Expand description
Adds the name command metadata.
Required Methods§
Sourcefn name(self) -> CommandMetaVar<Txt>
fn name(self) -> CommandMetaVar<Txt>
Gets a read-write variable that is the display name for the command.
Sourcefn name_with_shortcut(self) -> Var<Txt>where
Self: CommandShortcutExt,
fn name_with_shortcut(self) -> Var<Txt>where
Self: CommandShortcutExt,
Gets a read-only variable that formats the name and first shortcut formatted as "name (first_shortcut)"
Note that if no shortcut is set for the command this method returns the same as name.
Note that the shortcut keys are not localized, consider using ShortcutText! instead.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.