Struct icu::experimental::personnames::provided_struct::DefaultPersonName
source · pub struct DefaultPersonName { /* private fields */ }
Expand description
DefaultPersonName, default implementation provided for PersonNameFormatter.
Implementations§
source§impl DefaultPersonName
impl DefaultPersonName
Default person name functions.
sourcepub fn new(
person_data: LiteMap<NameField, String>,
locale: Option<Locale>,
preferred_order: Option<PreferredOrder>,
) -> Result<DefaultPersonName, PersonNamesFormatterError>
pub fn new( person_data: LiteMap<NameField, String>, locale: Option<Locale>, preferred_order: Option<PreferredOrder>, ) -> Result<DefaultPersonName, PersonNamesFormatterError>
Returns a new person name structure.
Trait Implementations§
source§impl PersonName for DefaultPersonName
impl PersonName for DefaultPersonName
source§fn name_locale(&self) -> Option<&Locale>
fn name_locale(&self) -> Option<&Locale>
Returns the name locale of person name.
source§fn preferred_order(&self) -> Option<&PreferredOrder>
fn preferred_order(&self) -> Option<&PreferredOrder>
Returns the preferred order of person name.
source§fn 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.
source§fn available_name_fields(&self) -> Vec<&NameField>
fn available_name_fields(&self) -> Vec<&NameField>
Returns all available name field.
source§fn 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.
source§fn 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.
Auto Trait Implementations§
impl Freeze for DefaultPersonName
impl RefUnwindSafe for DefaultPersonName
impl Send for DefaultPersonName
impl Sync for DefaultPersonName
impl Unpin for DefaultPersonName
impl UnwindSafe for DefaultPersonName
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more