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§
Sourcefn role(&self) -> ProviderRole
fn role(&self) -> ProviderRole
Infrastructure role implemented by this factory.
Sourcefn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Stable provider identity selected in deployment manifests.
Sourcefn create(
&self,
config: &ProviderConfig,
context: &ProviderContext,
secrets: &dyn SecretProvider,
) -> ProviderResult<T>
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".