polywrap_plugin 0.1.11

Core package to build plugins in rust to interact with Polywrap Client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{fmt::Debug, sync::Arc};

use polywrap_core::invoker::Invoker;

use crate::error::PluginError;

pub trait PluginModule: Send + Sync + Debug {
    fn _wrap_invoke(
        &mut self,
        method_name: &str,
        params: &[u8],
        env: Option<&[u8]>,
        invoker: Arc<dyn Invoker>,
    ) -> Result<Vec<u8>, PluginError>;
}