pub trait ProviderFactory: Sized {
// Required methods
fn from_env() -> Result<Self>;
fn with_model(self, model: &str) -> Self;
}Expand description
Factory trait for constructing model providers
This trait is separate from StreamingModelProvider to allow trait objects
(Box
Required Methods§
Sourcefn from_env() -> Result<Self>
fn from_env() -> Result<Self>
Create provider from environment variables and default configuration
Sourcefn with_model(self, model: &str) -> Self
fn with_model(self, model: &str) -> Self
Set or update the model for this provider (builder pattern)
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.