Skip to main content

is_uri

Function is_uri 

Source
pub fn is_uri(target: &str) -> bool
Expand description

Check if a target string is a valid URI.

Uses the url crate (WHATWG URL Standard) for parsing, then filters to URIs that either have authority (://) or use a known opaque scheme. Without this filter, any word:stuff passes WHATWG parsing — e.g., YAML values like name: foo would be treated as URIs with scheme name.