pub struct ArticleFile {Show 13 fields
pub id: FileId,
pub name: String,
pub size: u64,
pub is_link_only: Option<bool>,
pub download_url: Option<Url>,
pub status: Option<FileStatus>,
pub viewer_type: Option<String>,
pub preview_state: Option<String>,
pub upload_url: Option<Url>,
pub upload_token: Option<String>,
pub supplied_md5: Option<String>,
pub computed_md5: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
Public/private file representation attached to an article.
Fields§
§id: FileIdFile identifier.
name: StringFile name.
size: u64File size in bytes.
is_link_only: Option<bool>Whether the file is only linked and not stored on Figshare.
download_url: Option<Url>Public or private file download URL, when present.
status: Option<FileStatus>Private file status, when present.
viewer_type: Option<String>Viewer type hint, when present.
preview_state: Option<String>Preview state hint, when present.
upload_url: Option<Url>Upload session URL, when present.
upload_token: Option<String>Upload token, when present.
supplied_md5: Option<String>Client-provided MD5 used when initiating the upload, when present.
computed_md5: Option<String>Server-computed MD5, when present.
extra: BTreeMap<String, Value>Additional untyped fields preserved for forward compatibility.
Implementations§
Source§impl ArticleFile
impl ArticleFile
Sourcepub fn upload_session_url(&self) -> Option<&Url>
pub fn upload_session_url(&self) -> Option<&Url>
Returns the upload session URL, when the file is hosted on Figshare.
Trait Implementations§
Source§impl Clone for ArticleFile
impl Clone for ArticleFile
Source§fn clone(&self) -> ArticleFile
fn clone(&self) -> ArticleFile
Returns a duplicate of the value. Read more
1.0.0 · 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 ArticleFile
impl Debug for ArticleFile
Source§impl<'de> Deserialize<'de> for ArticleFile
impl<'de> Deserialize<'de> for ArticleFile
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 ArticleFile
impl PartialEq for ArticleFile
Source§impl RepositoryFile for ArticleFile
impl RepositoryFile for ArticleFile
Source§fn file_id(&self) -> Option<Self::Id>
fn file_id(&self) -> Option<Self::Id>
Returns the file identifier when the service exposes one.
Source§fn size_bytes(&self) -> Option<u64>
fn size_bytes(&self) -> Option<u64>
Returns the file size in bytes when known.
Source§fn download_url(&self) -> Option<&Url>
fn download_url(&self) -> Option<&Url>
Returns the best direct download URL when one is already present on the payload.
Source§impl Serialize for ArticleFile
impl Serialize for ArticleFile
impl StructuralPartialEq for ArticleFile
Auto Trait Implementations§
impl Freeze for ArticleFile
impl RefUnwindSafe for ArticleFile
impl Send for ArticleFile
impl Sync for ArticleFile
impl Unpin for ArticleFile
impl UnsafeUnpin for ArticleFile
impl UnwindSafe for ArticleFile
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