pub struct TorrentSummary {Show 14 fields
pub info_hash: String,
pub name: String,
pub state: TorrentState,
pub progress: f64,
pub download_rate: u64,
pub upload_rate: u64,
pub total_size: u64,
pub num_peers: usize,
pub num_seeds: usize,
pub all_time_upload: u64,
pub all_time_download: u64,
pub added_time: i64,
pub user_seed_mode: bool,
pub checking_progress: f32,
}Expand description
Lightweight summary of a torrent for the HTTP API.
A reduced view of TorrentStats with only the fields needed for list views.
Constructed via From<&TorrentStats>.
Fields§
§info_hash: StringHex-encoded v1 info hash (empty string for v2-only torrents).
name: StringDisplay name from the torrent metadata.
state: TorrentStateCurrent torrent state.
progress: f64Download progress as a fraction (0.0–1.0).
download_rate: u64Current download rate in bytes/sec.
upload_rate: u64Current upload rate in bytes/sec.
total_size: u64Total size of the torrent in bytes.
num_peers: usizeNumber of connected peers.
num_seeds: usizeNumber of connected seeders.
all_time_upload: u64Total bytes uploaded across all sessions.
all_time_download: u64Total bytes downloaded across all sessions.
added_time: i64Time when the torrent was added (POSIX seconds).
user_seed_mode: boolWhether the user has enabled seed-only mode for this torrent.
checking_progress: f32Progress of piece checking (0.0–1.0), meaningful when state is Checking.
Trait Implementations§
Source§impl Clone for TorrentSummary
impl Clone for TorrentSummary
Source§fn clone(&self) -> TorrentSummary
fn clone(&self) -> TorrentSummary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TorrentSummary
impl Debug for TorrentSummary
Source§impl From<&TorrentStats> for TorrentSummary
impl From<&TorrentStats> for TorrentSummary
Source§fn from(s: &TorrentStats) -> Self
fn from(s: &TorrentStats) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TorrentSummary
impl RefUnwindSafe for TorrentSummary
impl Send for TorrentSummary
impl Sync for TorrentSummary
impl Unpin for TorrentSummary
impl UnsafeUnpin for TorrentSummary
impl UnwindSafe for TorrentSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more