intermodal/src/host_port_parse_error.rs
Casey Rodarmor 57a358e458
Allow creating magnet links with imdl torrent link
Magnet links can now be created from a metainfo file with:

    imdl torrent link --input METAINFO

type: added
2020-04-07 19:01:27 -07:00

16 lines
442 B
Rust

use crate::common::*;
#[derive(Debug, Snafu)]
#[snafu(visibility(pub(crate)))]
pub(crate) enum HostPortParseError {
#[snafu(display("Failed to parse host `{}`: {}", text, source))]
Host {
text: String,
source: url::ParseError,
},
#[snafu(display("Failed to parse port `{}`: {}", text, source))]
Port { text: String, source: ParseIntError },
#[snafu(display("Port missing: `{}`", text))]
PortMissing { text: String },
}