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§
sourcefn name_locale(&self) -> Option<&Locale>
fn name_locale(&self) -> Option<&Locale>
Returns the name locale of person name.
sourcefn preferred_order(&self) -> Option<&PreferredOrder>
fn preferred_order(&self) -> Option<&PreferredOrder>
Returns the preferred order of person name.
sourcefn get(&self, field: &NameField) -> &str
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.
sourcefn available_name_fields(&self) -> Vec<&NameField>
fn available_name_fields(&self) -> Vec<&NameField>
Returns all available name field.
sourcefn has_name_field_kind(&self, lookup_name_field: &NameFieldKind) -> bool
fn has_name_field_kind(&self, lookup_name_field: &NameFieldKind) -> bool
Returns true if the provided field name is available.
sourcefn has_name_field(&self, lookup_name_field: &NameField) -> bool
fn has_name_field(&self, lookup_name_field: &NameField) -> bool
Returns true if person have the name field matching the type and modifier.