Trait ProviderFactory

Source
pub trait ProviderFactory {
    type Provider: HybridProvider;

    // Required methods
    fn create_default() -> Self::Provider;
    fn create_with_config(config: ConnectionConfig) -> Self::Provider;
}
Expand description

Factory trait for creating provider instances

Required Associated Types§

Source

type Provider: HybridProvider

Provider type this factory creates

Required Methods§

Source

fn create_default() -> Self::Provider

Create a new provider instance with default configuration

Source

fn create_with_config(config: ConnectionConfig) -> Self::Provider

Create a new provider instance with custom configuration

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§