ImageGenerationModel

Trait ImageGenerationModel 

Source
pub trait ImageGenerationModel:
    Clone
    + Send
    + Sync {
    type Response: Send + Sync;
    type Client;

    // Required methods
    fn make(client: &Self::Client, model: impl Into<String>) -> Self;
    fn image_generation(
        &self,
        request: ImageGenerationRequest,
    ) -> impl Future<Output = Result<ImageGenerationResponse<Self::Response>, ImageGenerationError>> + Send;

    // Provided method
    fn image_generation_request(&self) -> ImageGenerationRequestBuilder<Self> { ... }
}
Available on crate feature image only.

Required Associated Types§

Required Methods§

Source

fn make(client: &Self::Client, model: impl Into<String>) -> Self

Source

fn image_generation( &self, request: ImageGenerationRequest, ) -> impl Future<Output = Result<ImageGenerationResponse<Self::Response>, ImageGenerationError>> + Send

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

Implementors§