A 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. It compiles the list down to native Rust code for ultimate speed and correctness. This list compilation is done as a separate step by the maintainer so the crate still compiles very quickly. If you need a dynamic list that can be updated at runtime, though slower, please use the publicsuffix crate instead.
Setting Up
Add this crate to your Cargo.toml
:
[]
= "1"
Examples
use ;
let suffix = List.suffix?;
assert_eq!;
assert_eq!;
let domain = List.domain?;
assert_eq!;
assert_eq!;
let domain = List.domain?;
assert_eq!;
assert_eq!;
let domain = List.domain?;
assert_eq!;
assert_eq!;
let domain = List.domain?;
assert_eq!;
assert_eq!;
let domain = List.domain?;
assert_eq!;
assert_eq!;