pub trait HostCapability: Send + Sync {
// Required methods
fn interfaces(&self) -> Vec<String>;
fn link(&self, linker: &mut Linker<ComponentState>) -> Result<()>;
// Provided method
fn create_state_boxed(
&self,
) -> Result<Option<(TypeId, Box<dyn Any + Send>)>> { ... }
}Expand description
Trait implemented by host capability instances.
An instance represents a configured capability (from one TOML block). Multiple TOML blocks with the same type create multiple instances.
Required Methods§
Sourcefn interfaces(&self) -> Vec<String>
fn interfaces(&self) -> Vec<String>
Fully qualified interfaces this capability provides (namespace:package/interface@version)