unicode_properties::general_category

Trait UnicodeGeneralCategory

Source
pub trait UnicodeGeneralCategory: Sized {
    // Required method
    fn general_category(self) -> GeneralCategory;

    // Provided methods
    fn general_category_group(self) -> GeneralCategoryGroup { ... }
    fn is_letter_cased(self) -> bool { ... }
}
Expand description

Query the general category property of a character.

See General Category Values for more info.

Required Methods§

Source

fn general_category(self) -> GeneralCategory

Queries the most general classification of a character.

Provided Methods§

Source

fn general_category_group(self) -> GeneralCategoryGroup

Queries the grouping of the most general classification of a character.

Source

fn is_letter_cased(self) -> bool

Queries whether the most general classification of a character belongs to the LetterCased group

The LetterCased group includes LetterUppercase, LetterLowercase, and LetterTitlecase categories, and is a subset of the Letter group.

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.

Implementations on Foreign Types§

Source§

impl UnicodeGeneralCategory for char

Implementors§