Skip to main content

Crate irontide_format

Crate irontide_format 

Source
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}/files template.
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 TorrentState variant to its lowercase display label.
format_state_with_super_seeding
parse_priority_label
Parse a priority slug ("skip" | "low" | "normal" | "high") into a FilePriority. Returns None for any other input — callers can map that to a 422 (Web UI) or ignore it (GUI passes the int directly).