Trait webkitten::script::ScriptingEngine [] [src]

pub trait ScriptingEngine {
    fn file_extension() -> &'static str;
    fn describe(file: File) -> ScriptResult<String>;
    fn execute<T, S>(
        file: File,
        arguments: Vec<String>,
        ui: &T,
        config_path: &str
    ) -> ScriptResult<bool>
    where
        T: ApplicationUI<S>,
        S: ScriptingEngine
; fn autocomplete<T, S>(
        file: File,
        arguments: Vec<String>,
        prefix: &str,
        ui: &T,
        config_path: &str
    ) -> ScriptResult<Vec<String>>
    where
        T: ApplicationUI<S>,
        S: ScriptingEngine
; fn on_buffer_event<T, S>(
        file: File,
        ui: &T,
        config_path: &str,
        window_index: u32,
        webview_index: u32,
        requested_uri: Option<&str>,
        event: &BufferEvent
    ) -> ScriptResult<()>
    where
        T: ApplicationUI<S>,
        S: ScriptingEngine
; }

A scripting runtime and event handler capable of evaluating file contents within the runtime, converting between internal runtime types and Rust types, and providing an interface to interaction with the UI.

Required Methods

The file extension to use when searching for command matches for this engine

Evaluate the contents of a file withn the scripting runtime and execute the description event trigger

Evaluate the contents of a file within the scripting runtime and execute the event trigger for running a command directly, providing the arguments to the scope

Evaluate the contents of a file within the scripting runtime and execute the event trigger for getting autocompletion results, providing the arguments and prefix to the scope

Evaluate the contents of a file within the scripting runtime and execute the event trigger matching the BufferEvent, provided the window index, webview index, and requested URI to the scope.

Implementors