pub struct File {
pub id: u64,
pub filename: String,
pub filesize: u64,
pub content_type: String,
pub description: String,
pub token: String,
pub author: UserEssentials,
pub created_on: OffsetDateTime,
pub digest: String,
pub downloads: u64,
}Expand description
a type for files to use as an API return type
alternatively you can use your own type limited to the fields you need
Fields§
§id: u64numeric id
filename: Stringthe filename
filesize: u64the file size in bytes
content_type: Stringthe file content type
description: Stringthe file description
token: Stringa token for the file
the author of the file
created_on: OffsetDateTimeThe time when this file was created
digest: Stringthe digest of the file
downloads: u64the number of downloads
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
impl Eq for File
impl StructuralPartialEq for File
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