pub struct FileResume {
pub url: String,
pub final_path: String,
pub part_path: String,
pub validator: Validator,
pub total_size: Option<u64>,
pub segment_size: u64,
pub completed: Vec<ByteRange>,
pub checksum: Option<Checksum>,
pub metadata: BTreeMap<String, String>,
pub updated_at_ms: u64,
}Expand description
Resume checkpoint for one partially downloaded file.
Fields§
§url: StringSource URL that identifies this checkpoint.
final_path: StringRelative to the task destination, using / separators.
part_path: StringRelative to the task destination, using / separators.
validator: ValidatorValidators captured when the partial data was written.
total_size: Option<u64>Total size of the file in bytes, when known.
segment_size: u64Segment size used by the segmented download.
completed: Vec<ByteRange>Byte ranges already written to the partial file.
checksum: Option<Checksum>Expected checksum for the file, when known.
metadata: BTreeMap<String, String>Backend-specific metadata gathered while probing the file.
updated_at_ms: u64Timestamp of the last checkpoint update in Unix milliseconds.
Implementations§
Source§impl FileResume
impl FileResume
Sourcepub fn completed_bytes(&self) -> u64
pub fn completed_bytes(&self) -> u64
Total bytes covered by the completed ranges.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether every byte of a file with a known size has been completed.
Trait Implementations§
Source§impl Clone for FileResume
impl Clone for FileResume
Source§impl Debug for FileResume
impl Debug for FileResume
Source§impl<'de> Deserialize<'de> for FileResume
impl<'de> Deserialize<'de> for FileResume
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
Auto Trait Implementations§
impl Forget for FileResume
impl Freeze for FileResume
impl Move for FileResume
impl RefUnwindSafe for FileResume
impl Send for FileResume
impl Sync for FileResume
impl Unpin for FileResume
impl UnsafeUnpin for FileResume
impl UnwindSafe for FileResume
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