pub struct FastResumeData {Show 42 fields
pub file_format: String,
pub file_version: i64,
pub info_hash: Vec<u8>,
pub name: String,
pub save_path: String,
pub pieces: Vec<u8>,
pub unfinished: Vec<UnfinishedPiece>,
pub total_uploaded: i64,
pub total_downloaded: i64,
pub active_time: i64,
pub seeding_time: i64,
pub finished_time: i64,
pub added_time: i64,
pub completed_time: i64,
pub last_download: i64,
pub last_upload: i64,
pub paused: i64,
pub queued: i64,
pub auto_managed: i64,
pub queue_position: i64,
pub sequential_download: i64,
pub seed_mode: i64,
pub trackers: Vec<Vec<String>>,
pub peers: Vec<u8>,
pub peers6: Vec<u8>,
pub file_priority: Vec<i64>,
pub piece_priority: Vec<i64>,
pub upload_rate_limit: i64,
pub download_rate_limit: i64,
pub max_connections: i64,
pub max_uploads: i64,
pub info: Option<Vec<u8>>,
pub super_seeding: i64,
pub url_seeds: Vec<String>,
pub http_seeds: Vec<String>,
pub info_hash2: Option<Vec<u8>>,
pub trees: HashMap<String, Vec<u8>>,
pub category: Option<String>,
pub created_by: Option<String>,
pub creation_date: Option<i64>,
pub tags: Vec<String>,
pub web_seed_stats: HashMap<String, WebSeedStats>,
}Expand description
libtorrent-compatible fast-resume data in bencode format.
This struct matches libtorrent’s resume file format so that resume data
can be read/written by both Torrent and libtorrent-based clients.
Every field uses #[serde(rename = "...")] to match libtorrent’s exact
bencode dictionary keys.
Fields§
§file_format: StringAlways “libtorrent resume file”.
file_version: i64Always 1.
info_hash: Vec<u8>20-byte SHA1 info hash.
name: StringTorrent name.
save_path: StringPath where files are saved.
pieces: Vec<u8>Bitfield indicating which pieces are complete.
unfinished: Vec<UnfinishedPiece>Partially downloaded pieces.
total_uploaded: i64Total bytes uploaded.
total_downloaded: i64Total bytes downloaded.
active_time: i64Total time active in seconds.
seeding_time: i64Total time spent seeding in seconds.
finished_time: i64Total time in finished state in seconds.
added_time: i64POSIX timestamp when the torrent was added.
completed_time: i64POSIX timestamp when the torrent completed.
last_download: i64POSIX timestamp of last download activity.
last_upload: i64POSIX timestamp of last upload activity.
paused: i64Whether the torrent is paused (0 or 1).
queued: i64Whether the torrent is queued by auto-manage (0 or 1).
auto_managed: i64Whether the torrent is auto-managed.
queue_position: i64Queue position (-1 = not queued).
sequential_download: i64Whether sequential download is enabled.
seed_mode: i64Whether seed mode is enabled.
trackers: Vec<Vec<String>>Tracker tiers (list of lists of tracker URLs).
peers: Vec<u8>Compact IPv4 peers (6 bytes each: 4 IP + 2 port).
peers6: Vec<u8>Compact IPv6 peers (18 bytes each: 16 IP + 2 port).
file_priority: Vec<i64>Per-file priority values.
piece_priority: Vec<i64>Per-piece priority values.
upload_rate_limit: i64Upload rate limit in bytes/sec (-1 = unlimited).
download_rate_limit: i64Download rate limit in bytes/sec (-1 = unlimited).
max_connections: i64Max connections for this torrent (-1 = unlimited).
max_uploads: i64Max upload slots for this torrent (-1 = unlimited).
info: Option<Vec<u8>>Raw bencoded info dictionary (for magnet links that have resolved).
super_seeding: i64BEP 16: whether super seeding was enabled.
url_seeds: Vec<String>BEP 19 web seed URLs (GetRight-style).
http_seeds: Vec<String>BEP 17 HTTP seed URLs (Hoffman-style).
info_hash2: Option<Vec<u8>>SHA-256 v2 info hash (32 bytes, BEP 52).
trees: HashMap<String, Vec<u8>>Cached piece-layer Merkle hashes per file. Key: hex-encoded file root hash. Value: concatenated 32-byte piece hashes. Allows skipping piece-layer hash requests on resume.
category: Option<String>User-assigned category label (qBt-compat). None = uncategorised.
created_by: Option<String>Torrent creator string from TorrentMetaV1.created_by. None if the
torrent was added via magnet before metadata resolved.
creation_date: Option<i64>UNIX timestamp (seconds) when the torrent was authored, from
TorrentMetaV1.creation_date. None if not present in the .torrent
file or if metadata has not yet resolved for a magnet-added torrent.
User-assigned tags (qBt-compat). Multi-valued per torrent. Empty vec
when no tags set; skip_serializing_if = "Vec::is_empty" keeps older
resume files (which have no tags key) bit-identical on save.
web_seed_stats: HashMap<String, WebSeedStats>Per-URL web-seed stats (BEP 17/19), keyed by URL. Empty map when no
stats accumulated; skip_serializing_if keeps older resume files
(which have no web_seed_stats key) bit-identical on save.
Backward-compat: #[serde(default)] means legacy resume files load
with an empty map.
Implementations§
Trait Implementations§
Source§impl Clone for FastResumeData
impl Clone for FastResumeData
Source§fn clone(&self) -> FastResumeData
fn clone(&self) -> FastResumeData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FastResumeData
impl Debug for FastResumeData
Source§impl<'de> Deserialize<'de> for FastResumeData
impl<'de> Deserialize<'de> for FastResumeData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for FastResumeData
impl PartialEq for FastResumeData
Source§fn eq(&self, other: &FastResumeData) -> bool
fn eq(&self, other: &FastResumeData) -> bool
self and other values to be equal, and is used by ==.