Skip to main content

SecretProvider

Trait SecretProvider 

Source
pub(crate) trait SecretProvider: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn accepted_args(&self) -> RangeInclusive<usize>;
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        args: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<String, SecretResolveError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A provider that can resolve secret values from an external source.

Required Methods§

Source

fn name(&self) -> &str

The function name this provider handles (e.g. "env_var").

Source

fn accepted_args(&self) -> RangeInclusive<usize>

The argument counts this provider accepts.

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, args: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<String, SecretResolveError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve the secret value from the given arguments.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§