#[non_exhaustive]pub struct NameComponent {
pub at_type: Option<String>,
pub value: String,
pub kind: String,
pub phonetic: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A single component of a Name (RFC 9553 §2.2.1.2).
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.at_type: Option<String>Object type discriminator; SHOULD be "NameComponent" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
value: StringThe component value (e.g. "Vincent").
kind: StringThe kind of name component: "title", "given", "given2",
"surname", "surname2", "credential", "generation", or
"separator".
phonetic: Option<String>Phonetic pronunciation of the component. If set, the parent
Name must set at least one of phonetic_script / phonetic_system.
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Trait Implementations§
Source§impl Clone for NameComponent
impl Clone for NameComponent
Source§fn clone(&self) -> NameComponent
fn clone(&self) -> NameComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NameComponent
impl Debug for NameComponent
Source§impl<'de> Deserialize<'de> for NameComponent
impl<'de> Deserialize<'de> for NameComponent
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
impl Eq for NameComponent
Source§impl PartialEq for NameComponent
impl PartialEq for NameComponent
Source§fn eq(&self, other: &NameComponent) -> bool
fn eq(&self, other: &NameComponent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NameComponent
impl Serialize for NameComponent
impl StructuralPartialEq for NameComponent
Auto Trait Implementations§
impl Freeze for NameComponent
impl RefUnwindSafe for NameComponent
impl Send for NameComponent
impl Sync for NameComponent
impl Unpin for NameComponent
impl UnsafeUnpin for NameComponent
impl UnwindSafe for NameComponent
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