Expand description
Shared human-readable formatting helpers for irontide crates.
Provides consistent string representations for sizes, transfer rates, ETAs, share ratios, and torrent state labels used by the GUI, CLI, and Web UI frontends.
Re-exports§
pub use file_entries::FlatFileEntry;pub use file_entries::build_flat;pub use peer_flags::peer_flags;pub use pseudo_trackers::PSEUDO_TRACKER_DHT_URL;pub use pseudo_trackers::PSEUDO_TRACKER_LSD_URL;pub use pseudo_trackers::PSEUDO_TRACKER_PEX_URL;pub use pseudo_trackers::PSEUDO_TRACKER_TIER;pub use pseudo_trackers::is_pseudo_tracker;pub use pseudo_trackers::synthesize_pseudo_trackers;
Modules§
- file_
entries - Shared flat-file entry builder for the GUI Content tab and Web UI
/webui/fragments/torrent/{hash}/filestemplate. - peer_
flags - qBittorrent-compatible peer-flag glyphs.
- pseudo_
trackers - qBittorrent-parity pseudo-trackers for the DHT/PeX/LSD subsystems.
Functions§
- format_
eta - Estimate remaining download time given outstanding bytes and current rate.
- format_
rate - Format a byte-per-second rate as a human-readable string.
- format_
ratio - Format the upload/download share ratio.
- format_
size - Format a raw byte count as a human-readable size string.
- format_
state - Map a
TorrentStatevariant to its lowercase display label. - format_
state_ with_ super_ seeding - parse_
priority_ label - Parse a priority slug (
"skip" | "low" | "normal" | "high") into aFilePriority. ReturnsNonefor any other input — callers can map that to a 422 (Web UI) or ignore it (GUI passes the int directly).