pub trait Predictor: Send + Sync {
// Required methods
async fn forward(&self, inputs: Example) -> Result<Prediction>;
async fn forward_with_config(
&self,
inputs: Example,
lm: Arc<Mutex<LM>>,
) -> Result<Prediction>;
}Required Methods§
async fn forward(&self, inputs: Example) -> Result<Prediction>
async fn forward_with_config( &self, inputs: Example, lm: Arc<Mutex<LM>>, ) -> Result<Prediction>
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.