Releases: rushmorem/publicsuffix
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.0
v1.3.2
If all you want is to do syntax checks, you can now just create an empty list to still take advantage of this library's domain and email parsing engines. Here is an example:-
let list = List::empty();
if list.parse_email("甲斐@黒川.日本").is_ok() {
// this is a valid email address
}
If this is all you use the library for, don't forget to disable default-features
in your Cargo.toml
so you don't download unnecessary dependencies.
v1.3.1
v1.3.0
v1.2.0
v1.1.0
Now you can parse URLs using List::parse_url
or hosts that can potentially be IP addresses using List::parse_host
.
List::parse_domain
rejects everything that is not a domain name. While this is very useful, domains and IP addresses are usually used interchangeably. Having to first check whether a host is an IP address before trying to parse it as a domain is not very convenient, hence List::parse_host
. List::parse_url
takes it a step further and allows you to just pass in a URL instead.