Skip to main content

MangoFetchPlugin

Trait MangoFetchPlugin 

Source
pub trait MangoFetchPlugin: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn name(&self) -> &str;
    fn version(&self) -> &str;
    fn initialize(&mut self, host: Arc<dyn PluginHost>) -> Result<()>;
    fn handle_command(
        &self,
        command: String,
        args: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'static>>;
    fn commands(&self) -> Vec<String>;

    // Provided method
    fn shutdown(&self) { ... }
}

Required Methods§

Source

fn id(&self) -> &str

Source

fn name(&self) -> &str

Source

fn version(&self) -> &str

Source

fn initialize(&mut self, host: Arc<dyn PluginHost>) -> Result<()>

Source

fn handle_command( &self, command: String, args: Value, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'static>>

Source

fn commands(&self) -> Vec<String>

Provided Methods§

Source

fn shutdown(&self)

Implementors§