rss_gen::dataFunction validate_url
Source pub fn validate_url(url: &str) -> Result<()>
Expand description
Validates a URL string.
§Arguments
url
- A string slice that holds the URL to validate.
§Returns
Ok(())
if the URL is valid.
Err(RssError)
if the URL is invalid.
§Errors
This function returns an Err(RssError::InvalidUrl)
if the URL is not valid or
if it does not use the http
or https
protocol.