pub struct File {
pub name: String,
pub uri: Option<Url>,
pub download_uri: Option<Url>,
pub display_name: Option<String>,
pub mime_type: Option<String>,
pub size_bytes: Option<i64>,
pub create_time: Option<OffsetDateTime>,
pub expiration_time: Option<OffsetDateTime>,
pub update_time: Option<OffsetDateTime>,
pub sha256_hash: Option<String>,
pub state: Option<FileState>,
}
Expand description
Represents a file resource in the Gemini API.
Fields§
§name: String
The unique identifier for the file.
uri: Option<Url>
The URI of the file.
download_uri: Option<Url>
The download URI of the file.
display_name: Option<String>
The display name of the file.
mime_type: Option<String>
The MIME type of the file.
size_bytes: Option<i64>
The size of the file in bytes.
create_time: Option<OffsetDateTime>
The creation time of the file.
expiration_time: Option<OffsetDateTime>
The expiration time of the file.
update_time: Option<OffsetDateTime>
The last update time of the file.
sha256_hash: Option<String>
The SHA-256 hash of the file.
state: Option<FileState>
The current state of the file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
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
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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