pub trait Backend: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn system_one(
&self,
req: &SystemOneRequest,
opts: &CallOptions,
) -> impl Future<Output = Result<SystemOneResponse, Error>> + Send;
}Expand description
Pluggable System One evaluator.
Client implements this so callers can depend on the trait
rather than the HTTP type. Additional backends (LLM, Cascade) are planned.
Required Methods§
Sourcefn system_one(
&self,
req: &SystemOneRequest,
opts: &CallOptions,
) -> impl Future<Output = Result<SystemOneResponse, Error>> + Send
fn system_one( &self, req: &SystemOneRequest, opts: &CallOptions, ) -> impl Future<Output = Result<SystemOneResponse, Error>> + Send
Evaluate req with per-call options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".