pub struct VideoContent {
pub url: String,
}Expand description
Video content (URL or base64 data URI).
Used for video input in multimodal interactions. Provider support varies:
OpenAI accepts input_video (https URL / file_id / data URI depending on
the model), Gemini accepts inline_data / fileData video parts, while
Anthropic does not accept video input — providers that cannot map video
surface an explicit error at request-build time instead of dropping it.
Fields§
§url: StringVideo URL or base64 data URI.
Implementations§
Source§impl VideoContent
impl VideoContent
Sourcepub fn from_base64(data: impl Into<String>) -> Self
pub fn from_base64(data: impl Into<String>) -> Self
Creates from base64 data (auto-wraps as data URI, defaults to video/mp4).
Sourcepub fn from_base64_with_mime(data: impl Into<String>, mime: &str) -> Self
pub fn from_base64_with_mime(data: impl Into<String>, mime: &str) -> Self
Creates from base64 data with a specific MIME type.
Sourcepub fn base64_data(&self) -> Option<&str>
pub fn base64_data(&self) -> Option<&str>
Extracts the base64 raw data (if this is a data URI).
Trait Implementations§
Source§impl Clone for VideoContent
impl Clone for VideoContent
Source§fn clone(&self) -> VideoContent
fn clone(&self) -> VideoContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoContent
impl Debug for VideoContent
Source§impl<'de> Deserialize<'de> for VideoContent
impl<'de> Deserialize<'de> for VideoContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VideoContent
impl PartialEq for VideoContent
Source§impl Serialize for VideoContent
impl Serialize for VideoContent
impl StructuralPartialEq for VideoContent
Auto Trait Implementations§
impl Freeze for VideoContent
impl RefUnwindSafe for VideoContent
impl Send for VideoContent
impl Sync for VideoContent
impl Unpin for VideoContent
impl UnsafeUnpin for VideoContent
impl UnwindSafe for VideoContent
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