pub struct Tables { /* private fields */ }Expand description
The tables of one plugin, checked and ready to call.
Split from Plugin on purpose: everything interesting – negotiation, the identity, calling –
works on the tables alone, and only the loading needs a library handle. That is what lets a
host that embeds a plugin in the same process (a test, a harness) use this directly, and it is
what its own tests exercise without a dlopen.
Implementations§
Source§impl Tables
impl Tables
Sourcepub unsafe fn from_root(
root: *const PmpxPlugin,
path: &Path,
) -> Result<Self, LoadError>
pub unsafe fn from_root( root: *const PmpxPlugin, path: &Path, ) -> Result<Self, LoadError>
Check what one plugin speaks and read its identity.
§Safety
root must point at a valid PmpxPlugin whose tables and functions stay valid for as long
as this value is used – the plugin’s 'static table, or one kept alive by a Plugin.
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The name the plugin reports for itself. The caller still has to check it against the manifest: a mismatch means the wrong thing was installed.
Sourcepub fn build_info(&self) -> (String, String)
pub fn build_info(&self) -> (String, String)
The rustc version and target the plugin was built with. Diagnostics only.