[−][src]Crate rfc2396
To use this crate, simply call one of the validate*
functions, depending on your use case and desired return type:
validate(S) -> bool
validate_nom(S) -> nom::IResult<&str, &str>
validate_opt(S) -> Option<&str>
validate_res(S) -> anyhow::Result<&str>
Where S
is some type that implements Into<&str>
; for example, &str
itself!
All functions except the _nom
variant will additionally ensure that the entire input is consumed and
matches exactly what was parsed internally. If you require that this check is not done (e.g. as part of a larger
parsing exercise), then use the _nom
variant.
Functions
validate | Validate the given URI against RFC2396, returning a |
validate_nom | Validate the given URI against RFC2396, returning a |
validate_opt | Validate the given URI against RFC2396, returning an |
validate_res | Validate the given URI against RFC2396, returning an |