pub struct CommandRegistry { /* private fields */ }Implementations§
Source§impl CommandRegistry
impl CommandRegistry
pub fn new() -> Self
pub fn default_set() -> Self
pub fn register(&mut self, command: Command)
Sourcepub fn contains(&self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
Is name registered? Lets the apply layer report
override-vs-new without exposing the inner map.
pub fn run( &self, name: &str, ctx: &mut EditContext<'_>, args: &[String], ) -> Result<()>
pub fn names(&self) -> Vec<&str>
pub fn specs(&self) -> Vec<CommandSpec>
Trait Implementations§
Source§impl Clone for CommandRegistry
impl Clone for CommandRegistry
Source§fn clone(&self) -> CommandRegistry
fn clone(&self) -> CommandRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandRegistry
impl Debug for CommandRegistry
Source§impl Default for CommandRegistry
impl Default for CommandRegistry
Source§fn default() -> CommandRegistry
fn default() -> CommandRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandRegistry
impl RefUnwindSafe for CommandRegistry
impl Send for CommandRegistry
impl Sync for CommandRegistry
impl Unpin for CommandRegistry
impl UnsafeUnpin for CommandRegistry
impl UnwindSafe for CommandRegistry
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