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§
sourcefn initialize<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
sourcefn retrieve<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CredentialAndPurposeKey>> + 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,
Retrieve a credential for an identity.
sourcefn unsubscribe(&self, address: &Address) -> Result<()>
fn unsubscribe(&self, address: &Address) -> Result<()>
Unsubscribe from credential refresh