Skip to main content

format_strict

Function format_strict 

Source
pub fn format_strict(uri: &str) -> Result<String, Error>
Expand description

As [format], but fails rather than repairing a target that is not already a valid URI reference.

Useful where the target comes from configuration and silently rewriting it would hide a mistake: a stray space in a deployment variable becomes %20 and a 404 at validation time, rather than an error at startup.