pub trait SecretsBackend: Send + Sync {
// Required methods
fn put(&self, record: SecretRecord) -> Result<SecretVersion, Error>;
fn get(
&self,
uri: &SecretUri,
version: Option<u64>,
) -> Result<Option<VersionedSecret>, Error>;
fn list(
&self,
scope: &Scope,
category_prefix: Option<&str>,
name_prefix: Option<&str>,
) -> Result<Vec<SecretListItem>, Error>;
fn delete(&self, uri: &SecretUri) -> Result<SecretVersion, Error>;
fn versions(&self, uri: &SecretUri) -> Result<Vec<SecretVersion>, Error>;
fn exists(&self, uri: &SecretUri) -> Result<bool, Error>;
}Expand description
Storage interface implemented by provider backends.
Required Methods§
fn put(&self, record: SecretRecord) -> Result<SecretVersion, Error>
fn get( &self, uri: &SecretUri, version: Option<u64>, ) -> Result<Option<VersionedSecret>, Error>
fn list( &self, scope: &Scope, category_prefix: Option<&str>, name_prefix: Option<&str>, ) -> Result<Vec<SecretListItem>, Error>
fn delete(&self, uri: &SecretUri) -> Result<SecretVersion, Error>
fn versions(&self, uri: &SecretUri) -> Result<Vec<SecretVersion>, Error>
fn exists(&self, uri: &SecretUri) -> Result<bool, Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SecretsBackend for DevBackend
impl SecretsBackend for DevBackend
fn put(&self, record: SecretRecord) -> Result<SecretVersion, Error>
fn get( &self, uri: &SecretUri, version: Option<u64>, ) -> Result<Option<VersionedSecret>, Error>
fn list( &self, scope: &Scope, category_prefix: Option<&str>, name_prefix: Option<&str>, ) -> Result<Vec<SecretListItem>, Error>
fn delete(&self, uri: &SecretUri) -> Result<SecretVersion, Error>
fn versions(&self, uri: &SecretUri) -> Result<Vec<SecretVersion>, Error>
fn exists(&self, uri: &SecretUri) -> Result<bool, Error>
Source§impl<T> SecretsBackend for Arc<T>where
T: SecretsBackend + ?Sized,
Available on crate feature std only.
impl<T> SecretsBackend for Arc<T>where
T: SecretsBackend + ?Sized,
Available on crate feature
std only.