Trait icu::experimental::personnames::api::PersonName

source ·
pub trait PersonName {
    // Required methods
    fn name_locale(&self) -> Option<&Locale>;
    fn preferred_order(&self) -> Option<&PreferredOrder>;
    fn get(&self, field: &NameField) -> &str;
    fn available_name_fields(&self) -> Vec<&NameField>;
    fn has_name_field_kind(&self, lookup_name_field: &NameFieldKind) -> bool;
    fn has_name_field(&self, lookup_name_field: &NameField) -> bool;
}
Expand description

Trait for providing person name data.

Required Methods§

source

fn name_locale(&self) -> Option<&Locale>

Returns the name locale of person name.

source

fn preferred_order(&self) -> Option<&PreferredOrder>

Returns the preferred order of person name.

source

fn get(&self, field: &NameField) -> &str

Returns the value of the given field name, it must match the name field requested. The string should be in NFC.

source

fn available_name_fields(&self) -> Vec<&NameField>

Returns all available name field.

source

fn has_name_field_kind(&self, lookup_name_field: &NameFieldKind) -> bool

Returns true if the provided field name is available.

source

fn has_name_field(&self, lookup_name_field: &NameField) -> bool

Returns true if person have the name field matching the type and modifier.

Implementors§