Skip to main content

PluginHost

Trait PluginHost 

Source
pub trait PluginHost: Send + Sync {
    // Required methods
    fn emit_event(&self, name: &str, payload: Value) -> Result<()>;
    fn show_toast(&self, toast_type: &str, message: &str) -> Result<()>;
    fn plugin_data_dir(&self, plugin_id: &str) -> PathBuf;
    fn plugin_frontend_dir(&self, plugin_id: &str) -> PathBuf;
    fn get_settings(&self, plugin_id: &str) -> Value;
    fn save_settings(&self, plugin_id: &str, settings: Value) -> Result<()>;
    fn proxy_config(&self) -> Option<ProxyConfig>;
    fn tool_path(&self, tool: &str) -> Option<PathBuf>;
    fn default_output_dir(&self) -> PathBuf;
}

Required Methods§

Source

fn emit_event(&self, name: &str, payload: Value) -> Result<()>

Source

fn show_toast(&self, toast_type: &str, message: &str) -> Result<()>

Source

fn plugin_data_dir(&self, plugin_id: &str) -> PathBuf

Source

fn plugin_frontend_dir(&self, plugin_id: &str) -> PathBuf

Source

fn get_settings(&self, plugin_id: &str) -> Value

Source

fn save_settings(&self, plugin_id: &str, settings: Value) -> Result<()>

Source

fn proxy_config(&self) -> Option<ProxyConfig>

Source

fn tool_path(&self, tool: &str) -> Option<PathBuf>

Source

fn default_output_dir(&self) -> PathBuf

Implementors§