qbit_rs/model/
transfer.rs

1#[derive(Debug, Clone, serde::Deserialize, PartialEq, Eq)]
2pub struct TransferInfo {
3    /// Global download rate (bytes/s)
4    pub dl_info_speed: u64,
5    /// Data downloaded this session (bytes)
6    pub dl_info_data: u64,
7    /// Global upload rate (bytes/s)
8    pub up_info_speed: u64,
9    /// Data uploaded this session (bytes)
10    pub up_info_data: u64,
11    /// Download rate limit (bytes/s)
12    pub dl_rate_limit: u64,
13    /// Upload rate limit (bytes/s)
14    pub up_rate_limit: u64,
15    /// DHT nodes connected to
16    pub dht_nodes: u64,
17    /// Connection status. Possible values: connected, disconnected, firewalled
18    pub connection_status: ConnectionStatus,
19}
20
21#[derive(Debug, Clone, serde::Deserialize, PartialEq, Eq)]
22#[serde(rename_all = "camelCase")]
23pub enum ConnectionStatus {
24    Connected,
25    Disconnected,
26    Firewalled,
27    #[serde(other)]
28    Unknown,
29}