pub trait ImageModel: Send + Sync {
// Required methods
fn provider_name(&self) -> &str;
fn model_id(&self) -> &str;
fn max_images_per_call(&self) -> impl Future<Output = Option<u32>> + Send;
fn generate(
&self,
options: ImageModelCallOptions,
) -> impl Future<Output = ImageModelGenerationResult> + Send;
}Required Methods§
fn provider_name(&self) -> &str
fn model_id(&self) -> &str
fn max_images_per_call(&self) -> impl Future<Output = Option<u32>> + Send
fn generate( &self, options: ImageModelCallOptions, ) -> impl Future<Output = ImageModelGenerationResult> + Send
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.