Struct pepper::command::CommandManager
source · [−]pub struct CommandManager {
pub aliases: AliasCollection,
/* private fields */
}
Fields
aliases: AliasCollection
Implementations
sourceimpl CommandManager
impl CommandManager
pub fn new() -> Self
pub fn register(
&mut self,
plugin_handle: Option<PluginHandle>,
name: &'static str,
completions: &'static [CompletionSource],
command_fn: CommandFn
)
pub fn find_command(&self, name: &str) -> Option<&Command>
pub fn commands(&self) -> &[Command]
pub fn history_len(&self) -> usize
pub fn history_entry(&self, index: usize) -> &str
pub fn add_to_history(&mut self, entry: &str)
pub fn eval_and_write_error(
ctx: &mut EditorContext,
client_handle: Option<ClientHandle>,
command: &mut String
) -> EditorFlow
pub fn try_eval(
ctx: &mut EditorContext,
client_handle: Option<ClientHandle>,
command: &mut String
) -> Result<EditorFlow, CommandError>
Auto Trait Implementations
impl RefUnwindSafe for CommandManager
impl Send for CommandManager
impl Sync for CommandManager
impl Unpin for CommandManager
impl UnwindSafe for CommandManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more