pub struct DownloadInfo {
pub id: String,
pub state: DownloadState,
pub file: Option<DownloadFile>,
pub expected_size: Option<u64>,
pub no_longer_available: bool,
}Expand description
A download, as PrepareDownload and DownloadStatus answer.
Fields§
§id: StringThe download’s id: the session user’s, for this item, source and tracks; the same id each time they prepare the same.
state: DownloadState§file: Option<DownloadFile>What the file is; None where the server does not know it.
expected_size: Option<u64>About how many bytes the file will be, for showing before it is
ready (“Waiting for Wi-Fi · 2.8 GB”): a film’s or an episode’s as
DownloadEstimate::size_bytes says, a track’s its file’s size, or
its converted rate over its length. Sent with PrepareDownload’s
answer and with DownloadStatus’s; None when the server cannot
tell. An older server leaves it out, or sends it only with
PrepareDownload’s answer. Ready’s size is exact.
no_longer_available: boolA paired server’s item’s download whose file was made, and
that is no longer available: that server stopped sharing it, or the
servers unpaired. Its state stays Ready, so the device keeps a
file it has whole; nothing more of it is read. One not made yet is
Failed with the cause NoLongerAvailable instead. Left out when
false.