[][src]Function rfc2396::validate_nom

pub fn validate_nom<'a, S>(uri: S) -> IResult<&'a str, &'a str> where
    S: Into<&'a str>, 

Validate the given URI against RFC2396, returning a nom::IResult<&str, &str> indicating its validity.

Examples

let validation = rfc2396::validate_nom("https://example.com");
assert_eq!(validation, nom::IResult::Ok(("", "https://example.com")));

Errors

If validation fails, the raw, default nom::IResult generated by nom will be returned.