Trait matrix_sdk::widget::CapabilitiesProvider

source ·
pub trait CapabilitiesProvider: Send + Sync + 'static {
    // Required method
    fn acquire_capabilities<'life0, 'async_trait>(
        &'life0 self,
        capabilities: Capabilities,
    ) -> Pin<Box<dyn Future<Output = Capabilities> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature experimental-widgets only.
Expand description

Must be implemented by a component that provides functionality of deciding whether a widget is allowed to use certain capabilities (typically by providing a prompt to the user).

Required Methods§

source

fn acquire_capabilities<'life0, 'async_trait>( &'life0 self, capabilities: Capabilities, ) -> Pin<Box<dyn Future<Output = Capabilities> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receives a request for given capabilities and returns the actual capabilities that the clients grants to a given widget (usually by prompting the user).

Implementors§