Trait public_suffix::Table
source · pub trait Table {
Show 14 associated constants and 0 method
const NODES_BITS_CHILDREN: u32;
const NODES_BITS_ICANN: u32;
const NODES_BITS_TEXT_OFFSET: u32;
const NODES_BITS_TEXT_LENGTH: u32;
const CHILDREN_BITS_WILDCARD: u32;
const CHILDREN_BITS_NODE_TYPE: u32;
const CHILDREN_BITS_HI: u32;
const CHILDREN_BITS_LO: u32;
const NODE_TYPE_NORMAL: u32;
const NODE_TYPE_EXCEPTION: u32;
const NUM_TLD: u32;
const TEXT: &'static str;
const NODES: &'static [u32];
const CHILDREN: &'static [u32];
}
Expand description
Implementation to allow the use of custom tables.
DO NOT IMPLEMENT THIS MANUALLY. This should only be implemented by the code generator where you feed it the list you want. This list should be formatted in the same way as https://publicsuffix.org/list/public_suffix_list.dat where a single line is either:
- A domain public suffix,
- A comment which starts with
//
, - or empty.
Required Associated Constants§
const NODES_BITS_CHILDREN: u32
const NODES_BITS_ICANN: u32
const NODES_BITS_TEXT_OFFSET: u32
const NODES_BITS_TEXT_LENGTH: u32
const CHILDREN_BITS_WILDCARD: u32
const CHILDREN_BITS_NODE_TYPE: u32
const CHILDREN_BITS_HI: u32
const CHILDREN_BITS_LO: u32
const NODE_TYPE_NORMAL: u32
const NODE_TYPE_EXCEPTION: u32
sourceconst TEXT: &'static str
const TEXT: &'static str
The resulting string is the combined text of all labels concatenated together.
sourceconst NODES: &'static [u32]
const NODES: &'static [u32]
NODES is the list of nodes. Each node is represented as a uint32, which encodes the node’s children, wildcard bit and node type (as an index into the children array), ICANN bit and text.
If the table was generated with the -comments flag, there is a //-comment after each node’s data. In it is the nodes-array indexes of the children, formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The nodeType is printed as + for normal, ! for exception, and o for parent-only nodes that have children but don’t match a domain label in their own right. An I denotes an ICANN domain.