pub fn validate_url(url: Url) -> Result<Url> {
    if url.scheme() != "http" && url.scheme() != "https" {
        return Err(Error::UrlValidationError(format!("Invalid scheme: {}", url.scheme())));
    }
    Ok(url)
}
/// Validates if the url starts with http or https
Validates if the url starts with http or https
Validates if the url starts with http or https
pub fn validate_url(url: Url) -> Result<Url> {
    if url.scheme() != "http" && url.scheme() != "https" {
        return Err(Error::UrlValidationError(format!("Invalid scheme: {}", url.scheme())));
    }
    Ok(url)
}
pub fn validate_url ( url : Url ) -> Result < Url > { if url . scheme ( ) != " " && url . scheme ( ) != " " { return Err ( Error :: UrlValidationError ( format ! ( " " url scheme ( ) ) ) ) ; } Ok ( url ) }
Validates if the url starts with http or https
Validates if the url starts with http or https
url
Url
url
Url