Trait CogResponse

Source
pub trait CogResponse: Send {
    // Required method
    fn into_response(
        self,
        request: Request,
    ) -> impl Future<Output = Result<Value>> + Send;
}
Expand description

A response from a Cog model

Required Methods§

Source

fn into_response( self, request: Request, ) -> impl Future<Output = Result<Value>> + Send

Convert the response into a JSON value

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.

Implementors§

Source§

impl<T: Serialize + Send + 'static> CogResponse for T