pub struct TorrentStats {Show 75 fields
pub state: TorrentState,
pub downloaded: u64,
pub uploaded: u64,
pub pieces_have: u32,
pub pieces_total: u32,
pub peers_connected: usize,
pub peers_available: usize,
pub checking_progress: f32,
pub peers_by_source: HashMap<PeerSource, usize>,
pub info_hashes: InfoHashes,
pub name: String,
pub has_metadata: bool,
pub is_seeding: bool,
pub is_finished: bool,
pub is_paused: bool,
pub auto_managed: bool,
pub sequential_download: bool,
pub super_seeding: bool,
pub user_seed_mode: bool,
pub has_incoming: bool,
pub need_save_resume: bool,
pub moving_storage: bool,
pub progress: f32,
pub progress_ppm: u32,
pub total_done: u64,
pub total: u64,
pub total_wanted_done: u64,
pub total_wanted: u64,
pub block_size: u32,
pub total_download: u64,
pub total_upload: u64,
pub total_payload_download: u64,
pub total_payload_upload: u64,
pub total_failed_bytes: u64,
pub total_redundant_bytes: u64,
pub all_time_download: u64,
pub all_time_upload: u64,
pub download_rate: u64,
pub upload_rate: u64,
pub download_payload_rate: u64,
pub upload_payload_rate: u64,
pub num_peers: usize,
pub num_seeds: usize,
pub num_complete: i32,
pub num_incomplete: i32,
pub list_seeds: usize,
pub list_peers: usize,
pub connect_candidates: usize,
pub num_connections: usize,
pub num_uploads: usize,
pub unique_peers_attempted: u64,
pub pipeline: Option<PeerPipelineSnapshot>,
pub choke_rotations: u64,
pub piece_steals: u64,
pub connections_limit: usize,
pub uploads_limit: usize,
pub distributed_full_copies: u32,
pub distributed_fraction: u32,
pub distributed_copies: f32,
pub current_tracker: String,
pub announcing_to_trackers: bool,
pub announcing_to_lsd: bool,
pub announcing_to_dht: bool,
pub added_time: i64,
pub completed_time: i64,
pub last_seen_complete: i64,
pub last_upload: i64,
pub last_download: i64,
pub active_duration: i64,
pub finished_duration: i64,
pub seeding_duration: i64,
pub save_path: String,
pub queue_position: i32,
pub error: String,
pub error_file: i32,
}Expand description
Aggregate statistics for a torrent.
Fields§
§state: TorrentStateCurrent torrent state.
downloaded: u64Total bytes downloaded (payload only).
uploaded: u64Total bytes uploaded (payload only).
pieces_have: u32Number of pieces that have been verified.
pieces_total: u32Total number of pieces in the torrent.
peers_connected: usizeNumber of currently connected peers.
peers_available: usizeNumber of known peers (connected + available).
checking_progress: f32Progress of piece checking (0.0–1.0), meaningful when state is Checking.
peers_by_source: HashMap<PeerSource, usize>Number of connected peers broken down by discovery source.
info_hashes: InfoHashesInfo hashes (v1 SHA-1 and/or v2 SHA-256) for this torrent.
name: StringDisplay name from the torrent metadata.
has_metadata: boolWhether metadata has been received (always true for .torrent adds).
is_seeding: boolWhether we have all pieces and are seeding.
is_finished: boolWhether all wanted pieces are downloaded (may differ from is_seeding with file priorities).
is_paused: boolWhether the torrent is paused.
auto_managed: boolWhether the torrent is auto-managed by the session queuing system.
sequential_download: boolWhether sequential piece downloading is enabled.
super_seeding: boolWhether BEP 16 super seeding mode is active.
user_seed_mode: boolWhether the user explicitly toggled seed-only mode (M159).
Distinct from is_seeding which reflects download completion.
When true, the engine stops scheduling new block requests but
continues to serve uploads to interested peers.
has_incoming: boolWhether we have accepted any incoming peer connections.
need_save_resume: boolWhether resume data needs to be saved.
moving_storage: boolWhether a storage move operation is in progress.
progress: f32Download progress as a fraction (0.0–1.0).
progress_ppm: u32Download progress in parts per million (0–1_000_000).
total_done: u64Total bytes of verified (downloaded and hash-checked) data.
total: u64Total size of the torrent in bytes.
total_wanted_done: u64Total bytes of wanted data that have been verified.
total_wanted: u64Total bytes of wanted data (respecting file priorities).
block_size: u32Block (sub-piece request) size in bytes.
total_download: u64Total bytes downloaded this session (including protocol overhead).
total_upload: u64Total bytes uploaded this session (including protocol overhead).
total_payload_download: u64Total payload bytes downloaded this session.
total_payload_upload: u64Total payload bytes uploaded this session.
total_failed_bytes: u64Total bytes of data that failed hash check.
total_redundant_bytes: u64Total bytes of redundant (duplicate) data received.
all_time_download: u64All-time total bytes downloaded (persisted across sessions via resume data).
all_time_upload: u64All-time total bytes uploaded (persisted across sessions via resume data).
download_rate: u64Current download rate in bytes/sec (including protocol overhead).
upload_rate: u64Current upload rate in bytes/sec (including protocol overhead).
download_payload_rate: u64Current payload download rate in bytes/sec.
upload_payload_rate: u64Current payload upload rate in bytes/sec.
num_peers: usizeNumber of peers connected (including half-open).
num_seeds: usizeNumber of connected peers that are seeds.
num_complete: i32Number of complete copies known from tracker scrape (-1 = unknown).
num_incomplete: i32Number of incomplete copies known from tracker scrape (-1 = unknown).
list_seeds: usizeTotal number of seeds across all trackers.
list_peers: usizeTotal number of peers across all trackers.
connect_candidates: usizeNumber of peers available to connect to (not yet connected).
num_connections: usizeNumber of active peer connections (TCP + uTP).
num_uploads: usizeNumber of unchoked peers we are uploading to.
unique_peers_attempted: u64M133: Total unique peer connection attempts during this session.
pipeline: Option<PeerPipelineSnapshot>M137: Peer pipeline lifecycle snapshot.
choke_rotations: u64M138: Total peers evicted by proactive choke rotation.
piece_steals: u64M149: Total number of piece-level steals performed.
connections_limit: usizeMaximum number of connections for this torrent.
uploads_limit: usizeMaximum number of unchoke slots for this torrent.
distributed_full_copies: u32Number of full distributed copies available in the swarm.
distributed_fraction: u32Fractional part of distributed copies (0–999).
distributed_copies: f32Distributed copies as a float (full + fraction/1000).
current_tracker: StringURL of the tracker we most recently announced to.
announcing_to_trackers: boolWhether we are currently announcing to any tracker.
announcing_to_lsd: boolWhether we are currently announcing to LSD (Local Service Discovery).
announcing_to_dht: boolWhether we are currently announcing to DHT.
added_time: i64Time when the torrent was added to the session.
completed_time: i64Time when the torrent completed downloading (0 = not completed).
last_seen_complete: i64Last time a complete copy was seen in the swarm (0 = never).
last_upload: i64Time of last upload activity (0 = never).
last_download: i64Time of last download activity (0 = never).
active_duration: i64Total seconds the torrent has been active (downloading or seeding).
finished_duration: i64Total seconds the torrent has been in finished state.
seeding_duration: i64Total seconds the torrent has been seeding.
save_path: StringCurrent save path for the torrent data.
queue_position: i32Position in the session queue (-1 = not queued).
error: StringHuman-readable error message (empty = no error).
error_file: i32Index of the file that caused the error (-1 = not file-specific).
Trait Implementations§
Source§impl Clone for TorrentStats
impl Clone for TorrentStats
Source§fn clone(&self) -> TorrentStats
fn clone(&self) -> TorrentStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more