Skip to main content

CommandKey

Trait CommandKey 

Source
pub trait CommandKey<K> {
    // Required method
    fn command_key(&self) -> &K;
}
Expand description

Exposes the command key stored in an application context.

Implementing this trait enables the convenience dispatch function and KeyMatcher. Custom Matcher implementations need not use it.

Required Methods§

Source

fn command_key(&self) -> &K

Returns the key of the command that should handle this context.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§