pub trait DynVideoModel:
Send
+ Sync
+ 'static {
// Required methods
fn provider(&self) -> &ProviderId;
fn model_id(&self) -> &ModelId;
fn max_videos_per_call(&self) -> Option<usize>;
fn supports_generate(&self) -> bool;
fn do_generate(
&self,
options: VideoOptions,
) -> BoxFuture<'_, Result<VideoResult, ProviderError>>;
fn supports_operations(&self) -> bool;
fn do_start(
&self,
options: VideoStartOptions,
) -> BoxFuture<'_, Result<VideoStartResult, ProviderError>>;
fn do_status(
&self,
options: VideoStatusOptions,
) -> BoxFuture<'_, Result<VideoStatusResult, ProviderError>>;
fn supports_webhook(&self) -> bool;
fn handle_webhook(
&self,
factory: WebhookFactory,
) -> BoxFuture<'_, Result<WebhookHandle, ProviderError>>;
}Expand description
Object-safe counterpart of VideoModel.
Required Methods§
Sourcefn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
See VideoModel::provider.
Sourcefn model_id(&self) -> &ModelId
fn model_id(&self) -> &ModelId
See VideoModel::model_id.
Sourcefn max_videos_per_call(&self) -> Option<usize>
fn max_videos_per_call(&self) -> Option<usize>
Sourcefn supports_generate(&self) -> bool
fn supports_generate(&self) -> bool
Sourcefn do_generate(
&self,
options: VideoOptions,
) -> BoxFuture<'_, Result<VideoResult, ProviderError>>
fn do_generate( &self, options: VideoOptions, ) -> BoxFuture<'_, Result<VideoResult, ProviderError>>
Sourcefn supports_operations(&self) -> bool
fn supports_operations(&self) -> bool
Sourcefn do_start(
&self,
options: VideoStartOptions,
) -> BoxFuture<'_, Result<VideoStartResult, ProviderError>>
fn do_start( &self, options: VideoStartOptions, ) -> BoxFuture<'_, Result<VideoStartResult, ProviderError>>
See VideoModel::do_start.
Sourcefn do_status(
&self,
options: VideoStatusOptions,
) -> BoxFuture<'_, Result<VideoStatusResult, ProviderError>>
fn do_status( &self, options: VideoStatusOptions, ) -> BoxFuture<'_, Result<VideoStatusResult, ProviderError>>
Sourcefn supports_webhook(&self) -> bool
fn supports_webhook(&self) -> bool
Sourcefn handle_webhook(
&self,
factory: WebhookFactory,
) -> BoxFuture<'_, Result<WebhookHandle, ProviderError>>
fn handle_webhook( &self, factory: WebhookFactory, ) -> BoxFuture<'_, Result<WebhookHandle, ProviderError>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".