pub struct ItemFile {
pub name: String,
pub source: Option<String>,
pub format: Option<String>,
pub mtime: Option<u64>,
pub size: Option<u64>,
pub md5: Option<String>,
pub crc32: Option<String>,
pub sha1: Option<String>,
pub original: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
File entry returned by metadata reads.
Fields§
§name: StringFile name relative to the item root.
source: Option<String>Origin of the file, such as original or derivative.
format: Option<String>IA format label.
mtime: Option<u64>Last modified timestamp.
size: Option<u64>Size in bytes.
md5: Option<String>MD5 hash when available.
crc32: Option<String>CRC32 hash when available.
sha1: Option<String>SHA1 hash when available.
original: Option<String>Original file name for derivative files.
extra: BTreeMap<String, Value>Any additional file metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemFile
impl<'de> Deserialize<'de> for ItemFile
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 RepositoryFile for ItemFile
impl RepositoryFile for ItemFile
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.
impl StructuralPartialEq for ItemFile
Auto Trait Implementations§
impl Freeze for ItemFile
impl RefUnwindSafe for ItemFile
impl Send for ItemFile
impl Sync for ItemFile
impl Unpin for ItemFile
impl UnsafeUnpin for ItemFile
impl UnwindSafe for ItemFile
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