pub struct FileData {
pub mime_type: String,
pub file_uri: String,
}Expand description
Core primitive types for building requests and parsing responses Coordinates for a previously uploaded file.
This struct contains the coordinates needed to reference a file that was uploaded to the Gemini API. The file URI and MIME type are provided by the API when a file is successfully uploaded.
Implements TryFrom for FileHandle (or &FileHandle to be precise) for user convenience,
as an uploaded file is represented via the File type but a FileHandle is required to
upload a file or search for files.
Fields§
§mime_type: StringThe IANA standard MIME type of the file
file_uri: StringThe URI of the uploaded file
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileData
impl<'de> Deserialize<'de> for FileData
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 TryFrom<&FileHandle> for FileData
impl TryFrom<&FileHandle> for FileData
impl StructuralPartialEq for FileData
Auto Trait Implementations§
impl Freeze for FileData
impl RefUnwindSafe for FileData
impl Send for FileData
impl Sync for FileData
impl Unpin for FileData
impl UnwindSafe for FileData
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