pub trait Provider: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn auth(&self) -> AuthStyle;
fn encode(&self, request: &Request<'_>) -> HttpCall;
fn decode(&self, body: &Value) -> Result<Reply, LlmError>;
fn error(&self, status: u16, headers: &HeaderMap, body: &str) -> LlmError;
}Expand description
One wire format. Pure: no network, no clock, no database.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".