rust-integration-services 0.5.26

A modern, fast, and lightweight integration library written in Rust, designed for memory safety and stability.
Documentation
1
2
3
4
5
6
7
8
pub fn parse_host(host: &str, default_port: u16) -> anyhow::Result<(&str, u16)> {
    if let Some((host, port)) = host.split_once(":") {
        let port: u16 = port.parse()?;
        Ok((host, port))
    } else {
        Ok((host, default_port))
    }
}