pub fn from_instance(
        instance: impl CapabilityProvider + 'static,
        binding_target_name: Option<String>,
        claims: Claims<wascap::jwt::CapabilityProvider>,
    ) -> Result<Self> {
        let b: Box<dyn CapabilityProvider> = Box::new(instance);
        let binding = binding_target_name.unwrap_or("default".to_string());

        Ok(NativeCapability {
            plugin: Some(b),
            native_bytes: None,
            claims: claims.clone(),
            binding_name: binding,
        })
    }
/// 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. You must also provide a set of valid
/// claims that can be generated from a signed JWT
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. You must also provide a set of valid
claims that can be generated from a signed JWT
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 . You must also provide a set of valid claims that can be generated from a signed JWT
pub fn from_instance(
        instance: impl CapabilityProvider + 'static,
        binding_target_name: Option<String>,
        claims: Claims<wascap::jwt::CapabilityProvider>,
    ) -> Result<Self> {
        let b: Box<dyn CapabilityProvider> = Box::new(instance);
        let binding = binding_target_name.unwrap_or("default".to_string());
        Ok(NativeCapability {
            plugin: Some(b),
            native_bytes: None,
            claims: claims.clone(),
            binding_name: binding,
        })
    }
pub fn from_instance ( instance : impl CapabilityProvider + ' static , binding_target_name : Option < String > , claims : Claims < wascap :: jwt :: CapabilityProvider > , ) -> Result < Self > { let b : Box < dyn CapabilityProvider > = Box :: new ( instance ) ; let binding = binding_target_name . unwrap_or ( " " . to_string ( ) ) ; Ok ( NativeCapability { plugin : Some ( b ) , native_bytes : None , claims : claims . clone ( ) , binding_name : binding , } ) }
This function is to be used for _capability embedding_.
This function is to be used for _capability embedding_ .
instance
impl CapabilityProvider + 'static
binding_target_name
Option<String>
claims
Claims<wascap::jwt::CapabilityProvider>
instance
impl CapabilityProvider + 'static
binding_target_name
Option<String>
claims
Claims<wascap::jwt::CapabilityProvider>