pub trait UnicodeProperties: Sized + Copy {
// Required methods
fn is_id_start(self) -> bool;
fn is_id_continue(self) -> bool;
fn is_other_id_start(self) -> bool;
fn is_other_id_continue(self) -> bool;
fn is_pattern_syntax(self) -> bool;
fn is_pattern_whitespace(self) -> bool;
}Expand description
Extend a type of code point to query if a value belongs to a particular Unicode property.
This trait defines methods for querying properties and classes mentioned or defined in Unicode® Standard Annex #31. These properties are used to determine if a code point (char) is valid for being the start/part of an identifier and assist in the standard treatment of Unicode identifiers in parsers and lexers.
More information:
Required Methods§
Sourcefn is_id_start(self) -> bool
fn is_id_start(self) -> bool
Returns true if this value is a member of ID_Start.
Sourcefn is_id_continue(self) -> bool
fn is_id_continue(self) -> bool
Returns true if this value is a member of ID_Continue.
Sourcefn is_other_id_start(self) -> bool
fn is_other_id_start(self) -> bool
Returns true if this value is a member of Other_ID_Start.
Sourcefn is_other_id_continue(self) -> bool
fn is_other_id_continue(self) -> bool
Returns true if this value is a member of Other_ID_Continue.
Sourcefn is_pattern_syntax(self) -> bool
fn is_pattern_syntax(self) -> bool
Returns true if this value is a member of Pattern_Syntax.
Sourcefn is_pattern_whitespace(self) -> bool
fn is_pattern_whitespace(self) -> bool
Returns true if this value is a member of Pattern_White_Space.
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.