intermodal/src/host_port_parse_error.rs

16 lines
442 B
Rust
Raw Normal View History

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 },
}