Trait sapio_wasm_plugin::client::Plugin [−][src]
pub trait Plugin: JsonSchema + Sized + for<'a> Deserialize<'a> where
<Self::ToType as TryFrom<Self>>::Error: Error + 'static, {
type ToType: Compilable + TryFrom<Self>;
fn get_api_inner() -> *mut c_char { ... }
unsafe fn create(c: *mut c_char) -> *mut c_char { ... }
unsafe fn create_result_err(c: *mut c_char) -> Result<String, String> { ... }
unsafe fn create_result(c: *mut c_char) -> Result<String, Box<dyn Error>> { ... }
unsafe fn register(name: &'static str, logo: Option<&'static [u8]>) { ... }
}
Expand description
The Plugin
trait is used to provide bindings for a WASM Plugin.
It’s not intended to be used internally, just as bindings.
Associated Types
type ToType: Compilable + TryFrom<Self>
Provided methods
fn get_api_inner() -> *mut c_char
fn get_api_inner() -> *mut c_char
gets the jsonschema for the plugin type, which is the API for calling create.
creates an instance of the plugin from a json pointer and outputs a result pointer