#[non_exhaustive]pub struct AddressComponent {
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 an Address (RFC 9553 §2.5.1.2).
Enumerated kind values include "room", "apartment", "floor",
"building", "number", "name", "block", "subdistrict",
"district", "locality", "region", "postcode", "country",
"direction", "landmark", "postOfficeBox", "separator".
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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 "AddressComponent" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
value: StringThe component value.
kind: StringThe kind of address component (see type-level doc for enumerated values).
phonetic: Option<String>Phonetic pronunciation. If set, parent Address 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 AddressComponent
impl Clone for AddressComponent
Source§fn clone(&self) -> AddressComponent
fn clone(&self) -> AddressComponent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddressComponent
impl Debug for AddressComponent
Source§impl<'de> Deserialize<'de> for AddressComponent
impl<'de> Deserialize<'de> for AddressComponent
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>,
impl Eq for AddressComponent
Source§impl PartialEq for AddressComponent
impl PartialEq for AddressComponent
Source§fn eq(&self, other: &AddressComponent) -> bool
fn eq(&self, other: &AddressComponent) -> bool
self and other values to be equal, and is used by ==.