pub trait LlmDispatch: Send + Sync {
// Required method
fn dispatch(&self, prompt: &str) -> Result<String, String>;
}Expand description
LLM dispatch trait — abstracted so tests can wire a deterministic
mock while production binds to OllamaClient::generate via
OllamaDispatch.
Required Methods§
Sourcefn dispatch(&self, prompt: &str) -> Result<String, String>
fn dispatch(&self, prompt: &str) -> Result<String, String>
Dispatch a single LLM call. The prompt carries the full shared-prefix + trust slots + stage body; the executor has already recorded the cache key.
§Errors
Returns Err(String) when the underlying LLM call fails — the
executor maps that into ExecutorError::LlmDispatch.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".