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 0 | 0 | 0 | 0 |
| 1.3.1 | 0 | 0 | 0 | 0 | 0 |
| 1.3.0 | 0 | 0 | 0 | 0 | 0 |
| 1.2.0 | 0 | 0 | 0 | 0 | 0 |
| 1.1.0 | 0 | 0 | 0 | 0 | 0 |
| 1.0.2 | 0 | 0 | 0 | 0 | 0 |
| 1.0.1 | 0 | 0 | 0 | 0 | 0 |
| 1.0.0 | 0 | 0 | 0 | 0 | 0 |
| 0.0.5 | 0 | 0 | 0 | 0 | 0 |
| 0.0.4 | 0 | 0 | 0 | 0 | 0 |
| 0.0.3 | 0 | 0 | 0 | 0 | 0 |
| 0.0.2 | 0 | 0 | 0 | 0 | 0 |
| 0.0.1 | 0 | 0 | 0 | 0 | 0 |
| 0.0.0 | 0 | 0 | 0 | 0 | 0 |
2.3.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseA native Rust library for Mozilla's Public Suffix List
This library uses Mozilla's Public Suffix List to reliably determine the suffix of a domain name. This crate provides a dynamic list that can be updated at runtime. If you need a faster, though static list, please use the psl crate instead.
NB: v1 of this crate contained logic to validate domain names and email addresses. Since v2, this functionality was moved to the addr crate. This crate also no longer downloads the list for you.
Add this crate to your Cargo.toml:
[dependencies]
publicsuffix = "2"use publicsuffix::{Psl, List};
// the official list can be found at
// https://publicsuffix.org/list/public_suffix_list.dat
let list: List = "<-- your public suffix list here -->".parse()?;
let suffix = list.suffix(b"www.example.com")?;
assert_eq!(suffix, "com");
assert_eq!(suffix.typ(), Some(Type::Icann));
let domain = list.domain(b"www.example.com")?;
assert_eq!(domain, "example.com");
assert_eq!(domain.suffix(), "com");
let domain = list.domain("www.食狮.中国".as_bytes())?;
assert_eq!(domain, "食狮.中国");
assert_eq!(domain.suffix(), "中国");
let domain = list.domain(b"www.xn--85x722f.xn--55qx5d.cn")?;
assert_eq!(domain, "xn--85x722f.xn--55qx5d.cn");
assert_eq!(domain.suffix(), "xn--55qx5d.cn");
let domain = list.domain(b"a.b.example.uk.com")?;
assert_eq!(domain, "example.uk.com");
assert_eq!(domain.suffix(), "uk.com");
let domain = list.domain(b"_tcp.example.com.")?;
assert_eq!(domain, "example.com.");
assert_eq!(domain.suffix(), "com.");