Skip to main content

ProviderFactory

Trait ProviderFactory 

Source
pub trait ProviderFactory<T>: Send + Sync {
    // Required methods
    fn role(&self) -> ProviderRole;
    fn provider_id(&self) -> &'static str;
    fn create(
        &self,
        config: &ProviderConfig,
        context: &ProviderContext,
        secrets: &dyn SecretProvider,
    ) -> ProviderResult<T>;
}
Expand description

Factory for one provider implementation and output interface.

Required Methods§

Source

fn role(&self) -> ProviderRole

Infrastructure role implemented by this factory.

Source

fn provider_id(&self) -> &'static str

Stable provider identity selected in deployment manifests.

Source

fn create( &self, config: &ProviderConfig, context: &ProviderContext, secrets: &dyn SecretProvider, ) -> ProviderResult<T>

Validates configuration and constructs a provider instance.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§