[][src]Function parity_multiaddr::from_url_lossy

pub fn from_url_lossy(url: &str) -> Result<Multiaddr, FromUrlErr>

Attempts to parse an URL into a multiaddress. Ignores possible loss of information.

This function is similar to from_url, except that we don't return an error if some information in the URL cannot be retain in the generated multiaddres.

Example

let addr = "ws://user:pass@127.0.0.1:8080/";
assert!(parity_multiaddr::from_url(addr).is_err());
assert!(parity_multiaddr::from_url_lossy(addr).is_ok());