#[non_exhaustive]pub struct NamePart {
pub part_type: Option<NamePartType>,
pub value: String,
pub qualifiers: Vec<Qualifier>,
}Expand description
A portion of a full name, including the terms that make up that portion.
Some name parts may have qualifiers to provide additional semantic meaning to the name part (e.g., “given name” or “surname”).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.part_type: Option<NamePartType>The type of the name part.
value: StringThe term(s) from the name that make up this name part.
A name part value MAY contain more than one term from the full name, such as in the name part “John Fitzgerald” from the full name “John Fitzgerald Kennedy”. If multiple terms are detailed in a single NamePart, these terms SHOULD be separated using the name separator appropriate to the locale applicable to the containing name form.
qualifiers: Vec<Qualifier>Qualifiers to add additional semantic meaning to the name part.
If present, use of a
NamePartQualifier is
RECOMMENDED.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NamePart
impl<'de> Deserialize<'de> for NamePart
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl YaDeserialize for NamePart
impl YaDeserialize for NamePart
fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>
Source§impl YaSerialize for NamePart
impl YaSerialize for NamePart
fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>
fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>
impl Eq for NamePart
impl StructuralPartialEq for NamePart
Auto Trait Implementations§
impl Freeze for NamePart
impl RefUnwindSafe for NamePart
impl Send for NamePart
impl Sync for NamePart
impl Unpin for NamePart
impl UnwindSafe for NamePart
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)