Skip to main content

EnumeratedCharProperty

Trait EnumeratedCharProperty 

Source
pub trait EnumeratedCharProperty: Sized + CharProperty {
    // Required methods
    fn all_values() -> &'static [Self];
    fn abbr_name(&self) -> &'static str;
    fn long_name(&self) -> &'static str;
    fn human_name(&self) -> &'static str;
}
Expand description

A Character Property with enumerated values.

This is similar to types Enumeration and Catalog, as defined in UAX#44.

Usage Note: If the property is of type Catalog, it’s recommended to (in some way) mark the type as non-exhaustive, so that adding new variants to the enum type won’t result in API breakage.

Required Methods§

Source

fn all_values() -> &'static [Self]

Exhaustive list of all property values.

Source

fn abbr_name(&self) -> &'static str

The abbreviated name of the property value.

Source

fn long_name(&self) -> &'static str

The long name of the property value.

Source

fn human_name(&self) -> &'static str

The human-readable name of the property value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§