pub struct PluginAbi {
pub abi_major: u32,
pub abi_minor: u32,
pub name: String,
pub version: String,
pub description: String,
pub capabilities: Vec<AbiCapability>,
}Expand description
A runtime plugin’s self-description, decoded from a native plugin’s
PluginDescriptor or a WASM plugin’s manifest. Both loaders produce this
one type, and one host adapter turns it into registry capabilities.
Fields§
§abi_major: u32§abi_minor: u32§name: StringThe plugin id: lowercase letters, digits, -, _ and ..
version: String§description: String§capabilities: Vec<AbiCapability>In declaration order; a call names a capability by its index here.
Implementations§
Source§impl PluginAbi
impl PluginAbi
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
A description for this ABI version, with no capabilities.
Sourcepub fn validate(&self) -> Result<(), AbiError>
pub fn validate(&self) -> Result<(), AbiError>
Check the version and every field a host relies on.
Sourcepub fn to_manifest(&self) -> String
pub fn to_manifest(&self) -> String
The manifest text form, which a WASM plugin returns from
wasm::MANIFEST:
rich-plugin-abi 1.0
name shout
version 0.1.0
description Upper-cases text
capability transform upper
capability fence-markup shoutTrait Implementations§
impl Eq for PluginAbi
impl StructuralPartialEq for PluginAbi
Auto Trait Implementations§
impl Freeze for PluginAbi
impl RefUnwindSafe for PluginAbi
impl Send for PluginAbi
impl Sync for PluginAbi
impl Unpin for PluginAbi
impl UnsafeUnpin for PluginAbi
impl UnwindSafe for PluginAbi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.