1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Progress counters used by events and API callbacks.
/// Aggregate progress counters across a request.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AggregateProgress {
/// Downloaded bytes across all active streams.
pub downloaded_bytes: u64,
/// Expected total bytes when known.
pub total_bytes: Option<u64>,
/// Current aggregate bytes per second.
pub bytes_per_second: u64,
}
/// Per-stream progress counters.
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct StreamProgress {
/// Stable stream identifier within the session.
pub stream_id: String,
/// Downloaded bytes for this stream.
pub downloaded_bytes: u64,
/// Expected stream bytes when known.
pub total_bytes: Option<u64>,
/// Current stream bytes per second.
pub bytes_per_second: u64,
/// Number of consecutive low-speed ticks observed by the compatibility speed state.
pub low_speed_count: u32,
/// Completed segment count.
pub completed_segments: u64,
/// Expected segment count when known.
pub total_segments: Option<u64>,
}
/// Per-segment progress counters.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SegmentProgress {
/// Stable stream identifier within the session.
pub stream_id: String,
/// Segment index within the stream.
pub segment_index: u64,
/// Downloaded segment bytes.
pub downloaded_bytes: u64,
/// Expected segment bytes when known.
pub total_bytes: Option<u64>,
/// Current stream bytes per second.
pub bytes_per_second: u64,
/// Number of consecutive low-speed ticks observed by the compatibility speed state.
pub low_speed_count: u32,
/// Current retry attempt.
pub retry_attempt: u32,
}