pub trait SpecialCommandwhere
Self: Sized,{
// Required methods
fn identifier_to_command(
identifier: char,
input: &str,
) -> Result<Self, String>;
fn is_identifier(character: char) -> bool;
fn is_incremental(identifier: char) -> bool;
}Expand description
Trait for converting an identifier like “/” to a special command.
Required Methods§
Sourcefn identifier_to_command(identifier: char, input: &str) -> Result<Self, String>
fn identifier_to_command(identifier: char, input: &str) -> Result<Self, String>
Convert an identifier like “/” to a special command.
Sourcefn is_identifier(character: char) -> bool
fn is_identifier(character: char) -> bool
Check if a character is a special command identifier.
Sourcefn is_incremental(identifier: char) -> bool
fn is_incremental(identifier: char) -> bool
Check if the identifier is declared always.
The always option means that the command is activated every time a character is typed (like
incremental search).
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.