pub struct Video {
pub url: Option<String>,
pub data: Option<Vec<u8>>,
pub mime_type: Option<String>,
pub model: Option<String>,
pub duration: Option<f64>,
pub raw: Value,
/* private fields */
}Expand description
A generated clip (RubyLLM::Video). Save it with Video::save or read its bytes with
Video::to_blob; both handle hosted URLs and inline data.
Fields§
§url: Option<String>The URL of the hosted video, for providers that return one.
data: Option<Vec<u8>>The video bytes, returned inline or downloaded with the provider’s credentials.
mime_type: Option<String>The MIME type, such as "video/mp4".
model: Option<String>The id of the model that generated the video.
duration: Option<f64>The clip length in seconds, when the provider reports one.
raw: ValueThe provider’s raw job response, for fields such as reported cost.
Implementations§
Source§impl Video
impl Video
Sourcepub fn new(url: Option<String>, mime_type: Option<String>, raw: Value) -> Video
pub fn new(url: Option<String>, mime_type: Option<String>, raw: Value) -> Video
Video.new(url:, data:, mime_type:, model:, duration:, raw:).
Sourcepub fn config(&self) -> Arc<Config> ⓘ
pub fn config(&self) -> Arc<Config> ⓘ
Video#config: the configuration of the context that generated the video, whose
connection settings (http_proxy, request_timeout) the download uses; the global one otherwise.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Video
impl !UnwindSafe for Video
impl Freeze for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl UnsafeUnpin for Video
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