/// This function is to be used for _capability embedding_. If you are building a custom
/// waSCC host and have a fixed set of capabilities that you want to always be available
/// to actors, then you can declare a dependency on the capability provider, enable
/// the `static_plugin` feature, and provide an instance of that provider. Be sure to check
/// that the provider supports capability embedding.    
This function is to be used for _capability embedding_. If you are building a custom
waSCC host and have a fixed set of capabilities that you want to always be available
to actors, then you can declare a dependency on the capability provider, enable
the `static_plugin` feature, and provide an instance of that provider. Be sure to check
that the provider supports capability embedding.
This function is to be used for _capability embedding_ . If you are building a custom waSCC host and have a fixed set of capabilities that you want to always be available to actors then you can declare a dependency on the capability provider enable the ` static_plugin ` feature and provide an instance of that provider . Be sure to check that the provider supports capability embedding .
pub fn from_instance(
        instance: impl CapabilityProvider,
        binding_name: Option<String>,
    ) -> Result<Self> {
        let capid = instance.capability_id();
        Ok(NativeCapability {
            capid: capid.to_string(),
            plugin: Box::new(instance),
            binding_name: binding_name.unwrap_or("default".to_string()),
            library: None,
        })
    }
pub fn from_instance ( instance : impl CapabilityProvider , binding_name : Option < String > , ) -> Result < Self > { let capid = instance . capability_id ( ) ; Ok ( NativeCapability { capid : capid . to_string ( ) , plugin : Box :: new ( instance ) , binding_name : binding_name . unwrap_or ( " " . to_string ( ) ) , library : None , } ) }
This function is to be used for _capability embedding_.
This function is to be used for _capability embedding_ .
instance
impl CapabilityProvider
binding_name
Option<String>