Trait precis_core::stringclasses::StringClass[][src]

pub trait StringClass {
    fn get_value_from_char(&self, c: char) -> DerivedPropertyValue;
fn get_value_from_codepoint(&self, cp: u32) -> DerivedPropertyValue; fn allows(&self, label: &str) -> bool { ... } }
Expand description

Base interface for all String classes in PRECIS framework.

Required methods

Gets the derived property value according to the algorithm defined in ``get_derived_property_value`

Arguments
  • c- unicode character
Return

This method returns the derived property value associated to a unicode character

Gets the derived property value according to the algorithm defined in ``get_derived_property_value`

Arguments:
  • cp- unicode codepoint
Return

This method returns the derived property value associated to a unicode character

Provided methods

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

Arguments:
  • label - string to check
Returns

true if all character of label are allowed by the String Class.

Implementors