pub struct DriveFile {Show 13 fields
pub id: String,
pub name: String,
pub mime_type: String,
pub size: Option<String>,
pub md5_checksum: Option<String>,
pub sha1_checksum: Option<String>,
pub sha256_checksum: Option<String>,
pub modified_time: Option<String>,
pub parents: Vec<String>,
pub web_view_link: Option<String>,
pub owners: Vec<Owner>,
pub drive_id: Option<String>,
pub export_links: Option<HashMap<String, String>>,
}Expand description
A Drive file (or folder, or Google-native document) — the files
resource returned by files.list/files.get.
Fields§
§id: StringDrive file id.
name: StringDisplay name.
mime_type: StringMIME type. application/vnd.google-apps.* marks a Google-native
document (Docs/Sheets/Slides/…) with no fixed byte content.
size: Option<String>Size in bytes, as a decimal string. Absent for folders and Google-native documents.
md5_checksum: Option<String>MD5 checksum of the file’s content, as a lowercase hex string. Absent for folders and Google-native documents. Has the broadest historical coverage of the three checksum fields — sha1/sha256 were added to the Drive API later, so a very old, untouched file may lack them while still carrying this one.
sha1_checksum: Option<String>SHA-1 checksum of the file’s content, as a lowercase hex string.
Same availability caveats as Self::md5_checksum.
sha256_checksum: Option<String>SHA-256 checksum of the file’s content, as a lowercase hex string.
Same availability caveats as Self::md5_checksum.
modified_time: Option<String>Last modification time (RFC 3339).
parents: Vec<String>Ids of the parent folders containing this file.
web_view_link: Option<String>A link for opening this file in a relevant Google editor or viewer.
owners: Vec<Owner>The file’s owners.
drive_id: Option<String>Id of the shared drive this file lives on, if any.
export_links: Option<HashMap<String, String>>Export links for a Google-native document, keyed by export MIME
type. Present only on files.get (requested in GET_FIELDS;
deliberately not requested by files.list’s LIST_FIELDS — it’s
irrelevant to a search-result table and would bloat every list
response). Values are export URLs (unused — Drive’s files.export
endpoint is called directly instead); drive read’s content-export
error path lists these keys when a Google-native file has no default
export MIME type.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DriveFile
impl<'de> Deserialize<'de> for DriveFile
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>,
impl Eq for DriveFile
Source§impl JsonlSerialize for DriveFile
impl JsonlSerialize for DriveFile
impl StructuralPartialEq for DriveFile
Auto Trait Implementations§
impl Freeze for DriveFile
impl RefUnwindSafe for DriveFile
impl Send for DriveFile
impl Sync for DriveFile
impl Unpin for DriveFile
impl UnsafeUnpin for DriveFile
impl UnwindSafe for DriveFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.