gossamer/url
Types
Values
pub fn can_parse(url: String) -> Bool
Returns a boolean value indicating if a URL string is valid and can be parsed.
pub fn can_parse_with_base(url: String, base: String) -> Bool
Returns a boolean value indicating if a URL string with a base is valid and can be parsed.
pub fn new(url: String) -> URL
Creates a new URL object by parsing the specified URL string. Throws a TypeError if the URL is invalid.
pub fn new_with_base(url: String, base: String) -> URL
Creates a new URL object by parsing the specified URL string with a base URL. Throws a TypeError if the URL is invalid.
pub fn parse(url: String) -> option.Option(URL)
Parses a URL string and returns a URL object, or None if invalid.
pub fn parse_with_base(
url: String,
base: String,
) -> option.Option(URL)
Parses a URL string relative to a base URL and returns a URL object, or
None if invalid.
pub fn search_params(
url: URL,
) -> url_search_params.URLSearchParams