WalletStore

Trait WalletStore 

Source
pub trait WalletStore: Send + Sync {
    // Required methods
    async fn store_credential(
        &self,
        cred: AnyCredential,
    ) -> Result<CredentialId>;
    async fn get_credential(&self, id: &CredentialId) -> Result<AnyCredential>;
    async fn list_credentials(
        &self,
        filter: CredentialFilter,
    ) -> Result<Vec<CredentialSummary>>;
    async fn delete_credential(&self, id: &CredentialId) -> Result<()>;
}
Expand description

Trait for wallet credential storage.

Required Methods§

Source

async fn store_credential(&self, cred: AnyCredential) -> Result<CredentialId>

Store a credential.

Source

async fn get_credential(&self, id: &CredentialId) -> Result<AnyCredential>

Retrieve a credential by ID.

Source

async fn list_credentials( &self, filter: CredentialFilter, ) -> Result<Vec<CredentialSummary>>

List credentials matching a filter.

Source

async fn delete_credential(&self, id: &CredentialId) -> Result<()>

Delete a credential.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§