Skip to main content

SecretsResolver

Trait SecretsResolver 

Source
pub trait SecretsResolver {
    // Required methods
    async fn insert(&self, secret: Secret);
    async fn insert_vec(&self, secrets: &[Secret]);
    async fn get_secret(&self, secret_id: &str) -> Option<Secret>;
    async fn find_secrets(&self, secret_ids: &[String]) -> Vec<String>;
    async fn remove_secret(&self, secret_id: &str) -> Option<Secret>;
    async fn len(&self) -> usize;
    async fn is_empty(&self) -> bool;
}
Expand description

Affinidi Secrets Resolver

Required Methods§

Source

async fn insert(&self, secret: Secret)

Insert a single Secret

Source

async fn insert_vec(&self, secrets: &[Secret])

Insert multiple Secrets

Source

async fn get_secret(&self, secret_id: &str) -> Option<Secret>

Get a Secret by its ID

Source

async fn find_secrets(&self, secret_ids: &[String]) -> Vec<String>

Find secrets by their key IDs

§Arguments
  • secret_ids - A list of secret IDs to find
§Returns

A list of secret IDs that were found

Source

async fn remove_secret(&self, secret_id: &str) -> Option<Secret>

Removes the secret with the given ID

Source

async fn len(&self) -> usize

Returns the number of known secrets

Source

async fn is_empty(&self) -> bool

Returns true if there are no known secrets

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§