Skip to main content

MediaGeneratorProvider

Trait MediaGeneratorProvider 

Source
pub trait MediaGeneratorProvider:
    Send
    + Sync
    + 'static {
    // Required methods
    fn provider_id(&self) -> &str;
    fn descriptor(&self) -> MediaProviderDescriptor;

    // Provided method
    fn generate_image<'life0, 'async_trait>(
        &'life0 self,
        _request: MediaGenerationRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ImageGenerationBatch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Extension-host service for media (image/video) generation providers. Providers return raw bytes; the core runtime persists artifacts, applies policy, and emits events.

Required Methods§

Provided Methods§

Source

fn generate_image<'life0, 'async_trait>( &'life0 self, _request: MediaGenerationRequest, ) -> Pin<Box<dyn Future<Output = Result<ImageGenerationBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§