pub trait RepositoryFile {
type Id: Clone;
// Required methods
fn file_id(&self) -> Option<Self::Id>;
fn file_name(&self) -> &str;
fn size_bytes(&self) -> Option<u64>;
// Provided methods
fn checksum(&self) -> Option<&str> { ... }
fn download_url(&self) -> Option<&Url> { ... }
}Expand description
Shared inspection surface for remote file entries.
Required Associated Types§
Required Methods§
Sourcefn file_id(&self) -> Option<Self::Id>
fn file_id(&self) -> Option<Self::Id>
Returns the file identifier when the service exposes one.
Sourcefn size_bytes(&self) -> Option<u64>
fn size_bytes(&self) -> Option<u64>
Returns the file size in bytes when known.
Provided Methods§
Sourcefn 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.