Skip to main content

Crate ens_normalize_rs

Crate ens_normalize_rs 

Source

Structs§

EnsNameNormalizer
Main struct to handle ENS name normalization including tokenization, validation, beautification and normalization
ProcessedName
Result of processing an ENS name. Contains tokenized name as intermediate processing result and validated labels. Validated labels can be normalized and beautified.
TokenDisallowed
Code point is disallowed
TokenEmoji
Represents a vector of code points of emoji cps_input contains vector of code from input string emoji contains vector of beautified emoji code points cps_no_fe0f contains vector of code points of emoji without FE0F
TokenIgnored
Code point should be ignored
TokenMapped
Code point should be mapped to vector of code points
TokenNfc
Represents a vector of code points that should be normalized using NFC
TokenStop
Represents a stop token (.)
TokenValid
A valid vector of code points
TokenizedLabel
Represents a tokenized ENS label (part of a name separated by periods), including sequence of tokens
TokenizedName
Represents a full ENS name, including the original input and the sequence of tokens
ValidatedLabel
Represents a validated ENS label as result of the validate_label function. Contains the original tokenized label and the type of the label.

Enums§

CollapsedEnsNameToken
Represents a collapsed token in an ENS name: either text or emoji
CurrableError
Errors that can be cured by the normalizer.
DisallowedSequence
Errors regarding disallowed sequences.
EnsNameToken
Represents a token in an ENS name. see https://docs.ens.domains/ensip/15#tokenize for more details.
ProcessError
Errors that can occur during processing of an ENS name.

Functions§

beautify
no-cache version of EnsNameNormalizer::beautify
normalize
no-cache version of EnsNameNormalizer::normalize
process
no-cache version of EnsNameNormalizer::process
tokenize
no-cache version of EnsNameNormalizer::tokenize

Type Aliases§

LabelType