Trait brush_core::builtins::SimpleCommand

source ·
pub trait SimpleCommand {
    // Required methods
    fn get_content(
        name: &str,
        content_type: ContentType,
    ) -> Result<String, Error>;
    fn execute(
        context: ExecutionContext<'_>,
        args: &[&str],
    ) -> Result<BuiltinResult, Error>;
}
Expand description

A simple command that can be registered as a built-in.

Required Methods§

source

fn get_content(name: &str, content_type: ContentType) -> Result<String, Error>

Returns the content of the built-in command.

source

fn execute( context: ExecutionContext<'_>, args: &[&str], ) -> Result<BuiltinResult, Error>

Executes the built-in command.

Object Safety§

This trait is not object safe.

Implementors§