pub trait Cog: Sized + Send {
type Request: DeserializeOwned + JsonSchema + Send;
type Response: CogResponse + Debug + JsonSchema;
// Required methods
fn setup() -> impl Future<Output = Result<Self>> + Send;
fn predict(&self, input: Self::Request) -> Result<Self::Response>;
}
Expand description
A Cog model
Required Associated Types§
type Request: DeserializeOwned + JsonSchema + Send
type Response: CogResponse + Debug + JsonSchema
Required Methods§
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.