pub struct GenerateVideo { /* private fields */ }Expand description
Builder returned by generate_video; .await runs the calls.
Implementations§
Source§impl GenerateVideo
impl GenerateVideo
Sourcepub fn max_videos_per_call(self, max_videos_per_call: u32) -> Self
pub fn max_videos_per_call(self, max_videos_per_call: u32) -> Self
Overrides the model’s videos-per-call limit.
Sourcepub fn aspect_ratio(self, aspect_ratio: VideoAspectRatio) -> Self
pub fn aspect_ratio(self, aspect_ratio: VideoAspectRatio) -> Self
Aspect ratio.
Sourcepub fn resolution(self, resolution: ImageSize) -> Self
pub fn resolution(self, resolution: ImageSize) -> Self
Resolution (1280x720).
Sourcepub fn frame_images(self, frame_images: Vec<FrameImage>) -> Self
pub fn frame_images(self, frame_images: Vec<FrameImage>) -> Self
First/last frame images.
Sourcepub fn input_references(self, input_references: Vec<VideoFile>) -> Self
pub fn input_references(self, input_references: Vec<VideoFile>) -> Self
Reference inputs.
Sourcepub fn generate_audio(self, generate_audio: bool) -> Self
pub fn generate_audio(self, generate_audio: bool) -> Self
Whether to generate audio.
Sourcepub fn poll(self, poll: PollConfig) -> Self
pub fn poll(self, poll: PollConfig) -> Self
Uses the asynchronous flow with polling.
Sourcepub fn webhook(self, factory: WebhookFactory) -> Self
pub fn webhook(self, factory: WebhookFactory) -> Self
Uses the asynchronous flow with a webhook created by factory
(falls back to polling when the model does not support webhooks).
Sourcepub fn download(self, download: Arc<dyn DownloadFn>) -> Self
pub fn download(self, download: Arc<dyn DownloadFn>) -> Self
Sets the function used to fetch videos returned as URLs.
Source§impl GenerateVideo
impl GenerateVideo
Sourcepub fn header(self, name: &str, value: &str) -> Self
pub fn header(self, name: &str, value: &str) -> Self
Adds one request header; invalid names or values are ignored.
Sourcepub fn provider_options(self, options: ProviderOptions) -> Self
pub fn provider_options(self, options: ProviderOptions) -> Self
Sets the provider-specific options.
Sourcepub fn provider_option(
self,
provider: impl Into<String>,
options: JsonObject,
) -> Self
pub fn provider_option( self, provider: impl Into<String>, options: JsonObject, ) -> Self
Sets the options of one provider.
Sourcepub fn cancellation(self, token: CancellationToken) -> Self
pub fn cancellation(self, token: CancellationToken) -> Self
Sets the cancellation token.
Sourcepub fn telemetry(self, options: TelemetryOptions) -> Self
pub fn telemetry(self, options: TelemetryOptions) -> Self
Sets the telemetry options.
Source§impl GenerateVideo
impl GenerateVideo
Sourcepub fn retry(self, policy: RetryPolicy) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
Sets the retry policy (default: two retries).
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Sets the number of retries of the default policy.
Trait Implementations§
Source§impl Debug for GenerateVideo
impl Debug for GenerateVideo
Source§impl IntoFuture for GenerateVideo
impl IntoFuture for GenerateVideo
Source§type Output = Result<GenerateVideoResult, Error>
type Output = Result<GenerateVideoResult, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <GenerateVideo as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <GenerateVideo as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !Freeze for GenerateVideo
impl !RefUnwindSafe for GenerateVideo
impl !UnwindSafe for GenerateVideo
impl Send for GenerateVideo
impl Sync for GenerateVideo
impl Unpin for GenerateVideo
impl UnsafeUnpin for GenerateVideo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more