Skip to main content

Backend

Trait Backend 

Source
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§

Source

fn name(&self) -> &str

Stable backend name, e.g. "typesafe".

Source

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".

Implementors§