pub struct ExCommand<H: Host> {
pub name: &'static str,
pub aliases: &'static [&'static str],
pub arg_kind: ArgKind,
pub min_prefix: usize,
pub run: fn(&mut Editor<Buffer, H>, &str, Option<LineRange>) -> Option<ExEffect>,
}Expand description
A single registered ex command.
Fields§
§name: &'static strCanonical full name (e.g. "quit").
aliases: &'static [&'static str]Alternate full names (e.g. ["quit!"]).
arg_kind: ArgKindWhat kind of argument this command takes.
min_prefix: usizeMinimum prefix length for vim-style abbreviation (1 → :q resolves to :quit).
run: fn(&mut Editor<Buffer, H>, &str, Option<LineRange>) -> Option<ExEffect>Handler called with the editor and args (text after the command name, trimmed).
Auto Trait Implementations§
impl<H> Freeze for ExCommand<H>
impl<H> RefUnwindSafe for ExCommand<H>
impl<H> Send for ExCommand<H>
impl<H> Sync for ExCommand<H>
impl<H> Unpin for ExCommand<H>
impl<H> UnsafeUnpin for ExCommand<H>
impl<H> UnwindSafe for ExCommand<H>
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