pub trait Matcher<K, C: ?Sized> {
// Required method
fn matches(&self, key: &K, context: &C) -> bool;
}Expand description
Determines whether a command key accepts the current context.
Matching receives only shared references and should not produce application side effects. The selected command receives mutable context and resources only after matching has finished.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".