pub(crate) trait VerifiedName: VerifiedSeal + Deref {
// Provided methods
fn validate_start(c: char) -> Result<(), Error> { ... }
fn validate(s: &str) -> Result<Self, Error> { ... }
fn is_valid_start(c: char) -> bool { ... }
fn is_valid_char(c: char) -> bool { ... }
fn extra_validation(_s: &str) -> Result<(), Error> { ... }
}Expand description
A trait representing the unambiguous rules to validate and construct an identifier.
The default implementations are the rules used for atom labels described in the top-level module
documentation, but can be modified to allow for some flexibility, e.g. tags have identical
rules with the exception of allowing : as an additional allowed separator.
Provided Methods§
Sourcefn validate_start(c: char) -> Result<(), Error>
fn validate_start(c: char) -> Result<(), Error>
Validates that a character is a valid starting character.
Sourcefn is_valid_start(c: char) -> bool
fn is_valid_start(c: char) -> bool
Checks if a character is an invalid starting character.
Sourcefn is_valid_char(c: char) -> bool
fn is_valid_char(c: char) -> bool
Checks if a character is valid for use.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl VerifiedName for Identifier
Unicode UAX #31 compliant identifier