Trait Plugin

Source
pub trait Plugin:
    Send
    + Sync
    + 'static {
    // Required method
    fn call<'a>(
        &self,
        txn: &mut (dyn Transaction<'a> + 'a),
        arg: Json,
    ) -> Result<Json, Error>;
}
Expand description

Plugins should implement this trait.

Required Methods§

Source

fn call<'a>( &self, txn: &mut (dyn Transaction<'a> + 'a), arg: Json, ) -> Result<Json, Error>

Executes the plugin. Returns JSON that will be sent back to the calling client.

§Arguments
  • txn: An IndraDB datastore transaction.
  • arg: The argument from the calling client.

Implementors§