Skip to main content

TorrentStats

Struct TorrentStats 

Source
pub struct TorrentStats {
Show 86 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 is_queued: bool, pub auto_managed: bool, pub sequential_download: bool, pub super_seeding: bool, pub user_seed_mode: bool, pub user_forced: bool, pub seed_ratio_override: Option<f64>, 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 holepunch_relayed: u64, pub dispatch_pieces_queued: u32, pub dispatch_pieces_inflight: u32, 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, pub category: Option<String>, pub created_by: Option<String>, pub creation_date: Option<i64>, pub piece_size: u64, pub tags: Vec<String>,
}
Expand description

Aggregate statistics for a torrent.

Fields§

§state: TorrentState

Current torrent state.

§downloaded: u64

Total bytes downloaded (payload only).

§uploaded: u64

Total bytes uploaded (payload only).

§pieces_have: u32

Number of pieces that have been verified.

§pieces_total: u32

Total number of pieces in the torrent.

§peers_connected: usize

Number of currently connected peers.

§peers_available: usize

Number of known peers (connected + available).

§checking_progress: f32

Progress 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: InfoHashes

Info hashes (v1 SHA-1 and/or v2 SHA-256) for this torrent.

§name: String

Display name from the torrent metadata.

§has_metadata: bool

Whether metadata has been received (always true for .torrent adds).

§is_seeding: bool

Whether we have all pieces and are seeding.

§is_finished: bool

Whether all wanted pieces are downloaded (may differ from is_seeding with file priorities).

§is_paused: bool

Whether the torrent is paused.

§is_queued: bool

Whether the torrent is queued by auto-manage.

§auto_managed: bool

Whether the torrent is auto-managed by the session queuing system.

§sequential_download: bool

Whether sequential piece downloading is enabled.

§super_seeding: bool

Whether BEP 16 super seeding mode is active.

§user_seed_mode: bool

Whether 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.

§user_forced: bool

Whether the user force-started this torrent (bypassing queue limits).

§seed_ratio_override: Option<f64>

Per-torrent seed ratio limit override (None = use session default).

§has_incoming: bool

Whether we have accepted any incoming peer connections.

§need_save_resume: bool

Whether resume data needs to be saved.

§moving_storage: bool

Whether a storage move operation is in progress.

§progress: f32

Download progress as a fraction (0.0–1.0).

§progress_ppm: u32

Download progress in parts per million (0–1_000_000).

§total_done: u64

Total bytes of verified (downloaded and hash-checked) data.

§total: u64

Total size of the torrent in bytes.

§total_wanted_done: u64

Total bytes of wanted data that have been verified.

§total_wanted: u64

Total bytes of wanted data (respecting file priorities).

§block_size: u32

Block (sub-piece request) size in bytes.

§total_download: u64

Total bytes downloaded this session (including protocol overhead).

§total_upload: u64

Total bytes uploaded this session (including protocol overhead).

§total_payload_download: u64

Total payload bytes downloaded this session.

§total_payload_upload: u64

Total payload bytes uploaded this session.

§total_failed_bytes: u64

Total bytes of data that failed hash check.

§total_redundant_bytes: u64

Total bytes of redundant (duplicate) data received.

§all_time_download: u64

All-time total bytes downloaded (persisted across sessions via resume data).

§all_time_upload: u64

All-time total bytes uploaded (persisted across sessions via resume data).

§download_rate: u64

Current download rate in bytes/sec (including protocol overhead).

§upload_rate: u64

Current upload rate in bytes/sec (including protocol overhead).

§download_payload_rate: u64

Current payload download rate in bytes/sec.

§upload_payload_rate: u64

Current payload upload rate in bytes/sec.

§num_peers: usize

Number of peers connected (including half-open).

§num_seeds: usize

Number of connected peers that are seeds.

§num_complete: i32

Number of complete copies known from tracker scrape (-1 = unknown).

§num_incomplete: i32

Number of incomplete copies known from tracker scrape (-1 = unknown).

§list_seeds: usize

Total number of seeds across all trackers.

§list_peers: usize

Total number of peers across all trackers.

§connect_candidates: usize

Number of peers available to connect to (not yet connected).

§num_connections: usize

Number of active peer connections (TCP + uTP).

§num_uploads: usize

Number of unchoked peers we are uploading to.

§unique_peers_attempted: u64

M133: Total unique peer connection attempts during this session.

§pipeline: Option<PeerPipelineSnapshot>

M137: Peer pipeline lifecycle snapshot.

§choke_rotations: u64

M138: Total peers evicted by proactive choke rotation.

§piece_steals: u64

M149: Total number of piece-level steals performed.

§holepunch_relayed: u64

M190: Total holepunch rendezvous requests relayed to other peers.

§dispatch_pieces_queued: u32

M187: Pieces queued for dispatch in PieceTracker (0 when no tracker).

§dispatch_pieces_inflight: u32

M187: Pieces currently in-flight in PieceTracker (0 when no tracker).

§connections_limit: usize

Maximum number of connections for this torrent.

§uploads_limit: usize

Maximum number of unchoke slots for this torrent.

§distributed_full_copies: u32

Number of full distributed copies available in the swarm.

§distributed_fraction: u32

Fractional part of distributed copies (0–999).

§distributed_copies: f32

Distributed copies as a float (full + fraction/1000).

§current_tracker: String

URL of the tracker we most recently announced to.

§announcing_to_trackers: bool

Whether we are currently announcing to any tracker.

§announcing_to_lsd: bool

Whether we are currently announcing to LSD (Local Service Discovery).

§announcing_to_dht: bool

Whether we are currently announcing to DHT.

§added_time: i64

Time when the torrent was added to the session.

§completed_time: i64

Time when the torrent completed downloading (0 = not completed).

§last_seen_complete: i64

Last time a complete copy was seen in the swarm (0 = never).

§last_upload: i64

Time of last upload activity (0 = never).

§last_download: i64

Time of last download activity (0 = never).

§active_duration: i64

Total seconds the torrent has been active (downloading or seeding).

§finished_duration: i64

Total seconds the torrent has been in finished state.

§seeding_duration: i64

Total seconds the torrent has been seeding.

§save_path: String

Current save path for the torrent data.

§queue_position: i32

Position in the session queue (-1 = not queued).

§error: String

Human-readable error message (empty = no error).

§error_file: i32

Index of the file that caused the error (-1 = not file-specific).

§category: Option<String>

User-assigned category label (qBt-compat). None = uncategorised.

§created_by: Option<String>

Torrent creator string (created by field of the .torrent). None for magnet-added torrents whose metadata has not yet resolved.

§creation_date: Option<i64>

UNIX timestamp (seconds) from the torrent’s creation date field. None if absent from the .torrent or if metadata has not resolved.

§piece_size: u64

Piece length in bytes (from the info dict). 0 if metadata has not yet resolved for a magnet-added torrent.

§tags: Vec<String>

User-assigned tags (qBt-compat). Multi-valued. Empty = no tags.

Trait Implementations§

Source§

impl Clone for TorrentStats

Source§

fn clone(&self) -> TorrentStats

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TorrentStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TorrentStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<&TorrentStats> for TorrentSummary

Source§

fn from(s: &TorrentStats) -> Self

Converts to this type from the input type.
Source§

impl Serialize for TorrentStats

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more