Notifications

This commit is contained in:
veeso
2021-09-28 12:44:51 +02:00
parent f0a91b1579
commit 198d421ab0
31 changed files with 1363 additions and 198 deletions
@@ -87,6 +87,13 @@ impl TransferStates {
pub fn aborted(&self) -> bool {
self.aborted
}
/// ### full_size
///
/// Returns the size of the entire transfer
pub fn full_size(&self) -> usize {
self.full.total
}
}
impl Default for ProgressStates {
@@ -305,6 +312,8 @@ mod test {
assert_eq!(states.aborted(), true);
states.reset();
assert_eq!(states.aborted(), false);
states.full.total = 1024;
assert_eq!(states.full_size(), 1024);
}
#[test]