pub trait CredentialRetriever: Send + Sync + 'static {
    // Required methods
    fn initialize<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn retrieve<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<CredentialAndPurposeKey>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe(&self, address: &Address) -> Result<()>;
    fn unsubscribe(&self, address: &Address) -> Result<()>;
}
Expand description

Trait for retrieving a credential for a given identity

Required Methods§

source

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

Initialization of the retriever. Might load initial state, or start scheduled refresh events.

source

fn retrieve<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<CredentialAndPurposeKey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a credential for an identity.

source

fn subscribe(&self, address: &Address) -> Result<()>

Subscribe to credential refresh

source

fn unsubscribe(&self, address: &Address) -> Result<()>

Unsubscribe from credential refresh

Implementors§