pub struct DownloadItem {
pub url: String,
pub path: PathBuf,
pub folder: PathBuf,
pub name: String,
pub size: u64,
pub type: Option<String>,
pub sha1: Option<String>,
}Fields§
§url: StringFull URL to fetch.
path: PathBufAbsolute path to write the file to.
folder: PathBufParent directory; created with create_dir_all before writing.
When empty the parent of path is used instead.
name: StringHuman-readable name used in error messages and progress events.
size: u64Expected file size in bytes (used for progress totals; 0 = unknown).
type: Option<String>Category label emitted with LaunchEvent::Progress (e.g. “assets”).
sha1: Option<String>Expected SHA-1 hex digest. When Some, the file is verified after
download; DownloadError::ChecksumMismatch is returned on mismatch.
Trait Implementations§
Source§impl Clone for DownloadItem
impl Clone for DownloadItem
Source§fn clone(&self) -> DownloadItem
fn clone(&self) -> DownloadItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DownloadItem
impl RefUnwindSafe for DownloadItem
impl Send for DownloadItem
impl Sync for DownloadItem
impl Unpin for DownloadItem
impl UnsafeUnpin for DownloadItem
impl UnwindSafe for DownloadItem
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