pub trait Linker<M: RawModule>: Sized {
type Config;
// Required methods
fn new(config: Self::Config) -> Result<Self>;
fn create(&self, binary: &[u8]) -> Result<M>;
fn import(
&mut self,
ns: impl Into<String>,
funcs: HashMap<String, M::Func>,
) -> Result<()>;
fn wrap_raw(
&self,
f: impl Fn(M::LinkerHandle<'_>, i32, i32) -> Result<Vec<u8>> + Send + Sync + 'static,
) -> M::Func;
// Provided methods
fn wrap<P: DeserializeOwned + Tuple, R: Serialize>(
&self,
f: impl Fn(P) -> Result<R> + Send + Sync + 'static,
) -> M::Func { ... }
fn wrap_with<P: DeserializeOwned + Tuple, R: Serialize>(
&self,
f: impl Fn(M::LinkerHandle<'_>, P) -> Result<R> + Send + Sync + 'static,
) -> M::Func { ... }
}Expand description
Represents the linker of plugin modules.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.