Struct precis_core::stringclasses::IdentifierClass[][src]

pub struct IdentifierClass {}
Expand description

Concrete class representing PRECIS IdentifierClass from RFC 8264.

Example

use precis_core::{DerivedPropertyValue,IdentifierClass,StringClass};

let id = IdentifierClass {};
// character 𐍁 is OtherLetterDigits (R)
assert_eq!(id.get_value_from_char('𐍁'), DerivedPropertyValue::SpecClassDis);
// Character S is ASCII7 (K)
assert_eq!(id.get_value_from_char('S'), DerivedPropertyValue::PValid);
// Character 0x1170 is OldHangulJamo (I)
assert_eq!(id.get_value_from_codepoint(0x1170), DerivedPropertyValue::Disallowed);

Trait Implementations

Callback invoked when the Unicode code point belongs to HasCompat Read more

Callback invoked when the Unicode code point belongs to OtherLetterDigits Read more

Callback invoked when the Unicode code point belongs to Spaces Read more

Callback invoked when the Unicode code point belongs to Symbols Read more

Callback invoked when the Unicode code point belongs to Punctuation Read more

Gets the derived property value according to the algorithm defined in rfc8264 Read more

Gets the derived property value according to the algorithm defined in rfc8264 Read more

Ensures that the string consists only of Unicode code points that are explicitly allowed by the PRECIS String Class Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.